hello, been a while
i’ve been messing around a little and thought of a fun little experience i could make on Roblox, however, since i am still a new scripter, i am struggling a little with this.
i am not trying to make the player attach itself to a part, i want the player to move independently as the spacebar is pressed.
how can i achieve this? what objects can i use?
thank you in advance
local uis = game:GetService("UserInputService")
local players = game:GetService("Players")
local player = players.LocalPlayer or players.PlayerAdded:Wait()
local character = player.Character or player.CharacterAdded:Wait()
local hmr = character:WaitForChild("HumanoidRootPart")
uis.InputBegan:Connect(function(key, proc)
if proc then
return
end
if key.KeyCode == Enum.KeyCode.Q then
hmr:TranslateBy(Vector3.new(0, 10, 0))
end
end)