What do I want to accomplish? – ONLY HELP IF YOU’VE GOT TIME!!
I want to make, so when a player Presses W, A, S or D the Character moves up, to the right, down or to the left, BUT, u do NOT need to hold the button, so if I press W once, it will continue walking up.
But i want the character to move, in the white lines, so they cant walk outside of it.
And can only change Direction if its in a radius of the corner.
I don’t know how to make the character to continue moving after just pressing the button or how to make so it can go outside of the lines. Neither do I know how to make it so its only able to turn while close to the corner!
I’ve been watching tutorials, looking through functions in studio, and Dev Hub but can’t find anything!
So that’s also why I Haven’t wrote the whole script here on devForum, I deleted the rest since it didn’t work!
local plr = game.Players.LocalPlayer
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(input, gameProccesedEvent)
if input.KeyCode == Enum.KeyCode.W then
print("The key: W, was pressed! By the player, " .. plr.Name)
end
end)
UIS.InputBegan:Connect(function(input, gameProccesedEvent)
if input.KeyCode == Enum.KeyCode.A then
print("The key: A, was pressed! By the player, " .. plr.Name)
end
end)
UIS.InputBegan:Connect(function(input, gameProccesedEvent)
if input.KeyCode == Enum.KeyCode.S then
print("The key: S, was pressed! By the player, " .. plr.Name)
end
end)
UIS.InputBegan:Connect(function(input, gameProccesedEvent)
if input.KeyCode == Enum.KeyCode.D then
print("The key: D, was pressed! By the player, " .. plr.Name)
end
end)
Only help if you got time, I’m not here to waste anyones time!