-
What do you want to achieve? [Video + Script below this text] Hello, I am trying to develop a movement system similar to the game Subway Surfer and so many others, the player can only move on 3 locations (middle, right, and left) by moving his finger on a direction. The problem with my script is that the direction of the character is uneven, while normally each time the directions should be the same. Here when I turn left or right, sometimes the player is at location “A” and sometimes at location “B”, when he should always be at the same location. I put my script and a video. I can rephrase better, I’m French and I have trouble finding the right vocabulary to explain in English. Thanks
-
What is your script + video?
plr.PlayerGui.ScreenGui.Deplacement.gauche.MouseEnter:Connect(function()
--Player want to move to the left
plr.PlayerGui.ScreenGui.Deplacement.Visible = false
plr.PlayerGui.ScreenGui.Deplacement.droite.Visible = false
plr.PlayerGui.ScreenGui.Deplacement.gauche.Visible = false
humanoid.WalkSpeed = 200
character.Humanoid:Move(Vector3.new(-500,0,-10)) --plr movement
wait(0.12)
humanoid.WalkSpeed = 16
character.Humanoid:Move(Vector3.new(0,0,-100))
plr.PlayerGui.ScreenGui.Deplacement.droite.Visible = true
plr.PlayerGui.ScreenGui.Deplacement.gauche.Visible = true
end)
plr.PlayerGui.ScreenGui.Deplacement.droite.MouseEnter:Connect(function()
--Player want to move to the right
plr.PlayerGui.ScreenGui.Deplacement.Visible = false
plr.PlayerGui.ScreenGui.Deplacement.droite.Visible = false
plr.PlayerGui.ScreenGui.Deplacement.gauche.Visible = false
humanoid.WalkSpeed = 200
character.Humanoid:Move(Vector3.new(500,0,-10)) --plr movement
wait(0.12)
humanoid.WalkSpeed = 16
character.Humanoid:Move(Vector3.new(0,0,-100))
plr.PlayerGui.ScreenGui.Deplacement.droite.Visible = true
plr.PlayerGui.ScreenGui.Deplacement.gauche.Visible = true
end)