Hello everyone, good morning (or afternoon if your in a different time zone) and today I have a serious question that came up in my head.
Literally, how do you move the position of your character on the X,Y, and Z axis similar to how you would do it for a brick?
Lately I have been going into the keyDown stuff, and even though im a complete novice towards scripting and probably shouldn't be doing this kind of advanced stuff, I like to experiment.
My ultimate goal is to make a script that once your press a certain key on the keyboard, it sends your character moving in different positions, as you are about to see in the code I will show you.
player = game.Players.LocalPlayer
tool = script.Parent
tool.Equipped:connect(function(mouse)
mouse.KeyDown:connect(function(key)
if key == "h" then
print("You pressed h")
else
print("Try again and press h")
end
end)
end)
That was my first attempt at doing anything with keyDown, and it is pretty basic.

6 comments
Use something like this
torso.CFrame = CFrame.new(-432, 2.2, 64)
So how would I be able to get the current position of the character, and add that one on? So that way it won't simply go to the position I put, and add on from the one the character is already at?
That question is for someone more advanced than me... Sorry.
Since it's a tool, and I want for it to be local would it be someting like game.Workspace.Players.LocalPlayer.torso.CFrame = CFrame.new(-432, 2.2, 64)? Because I am basically confused on moving the character itself.
Sorry, the question is beyond my knowledge... I wish I could help beyond what I said.