How do I make a block move itself forward like how velocity used to be. And not putting velocity under to the block under the part. But every time it repeats it goes up by a certain amount until it hits a max speed. What I am making is like a RC car drifting game and I might want to add turning later but for now I'd keep it to only move forward by W. Maybe CFrame will do the job. I don't know. I need recommendations. And I just want it when I am holding W it speeds up until max speed and when I let go for it to slow down. Pls keep as much things as you can that I already put it. (Btw RC is just a part named RC in workspace. and it has a script in it that says to anchor itself when a person joins the game because it starts unanchored.) I tried to put in all my info about this script pls try a script and pls try and fix it. If you aren't going to give me a list of issues and a revised script then type your thoughts/comments in the comment section pls. Btw its a LOCAL SCRIPT renamed to "W keypress" and its in 'STARTER GUI'.
local Player = game.Players.LocalPlayer local Mouse = Player:GetMouse() local RC = game.Workspace.RC game:GetService("UserInputService").InputBegan:Connect(function(inputObject, gameProcessedEvent) if inputObject.KeyCode == Enum.KeyCode.W then RC.Anchored = false print("w has been pressed") --RC.Velocity = Vector3.new(+5,0,0)-- end end) game:GetService("UserInputService").InputEnded:Connect(function(inputObject, gameProcessedEvent) if inputObject.KeyCode == Enum.KeyCode.W then print("w has stopped being pressed") --RC.Velocity = Vector3.new(0,0,0)-- RC.Anchored = true end end)
Closed as Not Constructive by DeceptiveCaster and Ziffixture
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?