local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoidRootPart = character:WaitForChild("HumanoidRootPart") -- Function to move the player local function movePlayer(offset) humanoidRootPart.CFrame = humanoidRootPart.CFrame * CFrame.new(offset) end -- Listen for the key press events local userInputService = game:GetService("UserInputService") userInputService.InputBegan:Connect(function(input, gameProcessedEvent) if gameProcessedEvent then return end -- Ignore if the game is processing the input already if input.KeyCode == Enum.KeyCode.R then -- Move the player back 34 studs (negative Z direction) movePlayer(Vector3.new(0, 0, 34)) -- Moving back means negative Z axis in Roblox elseif input.KeyCode == Enum.KeyCode.T then -- Move the player forward 48.5 studs (positive Z direction) movePlayer(Vector3.new(0, 0, -48.5)) -- Moving forward means positive Z axis in Roblox end end)