I have a script to make a block move forward continuously. It works just fine. But I wanted to make a main menu with a play button. So therefor I had to make it so the block would start moving after the player pressed the button Play. I tried to script it but couldn't figure it out. Can someone help? Here is the script
game.StarterGui.ScreenGui.Frame.Play.MouseButton1Down:connect(function()
wait(7)
local distance = 20000
script.Parent.Anchored = true
for i = 0, distance do
end
script.Parent.CFrame = script.Parent.CFrame+Vector3.new(2.1,0,0)
wait(0.1)
end)

3 comments
Doesn't seem to be working still. Here are some pictures of it. https://media.discordapp.net/attachments/965744506601373697/995435004698054697/unknown.png?width=980&height=663 https://cdn.discordapp.com/attachments/965744506601373697/995435050604703845/unknown.png https://cdn.discordapp.com/attachments/965744506601373697/995435431489454170/unknown.png
Ah I see, convert the Script to a LocalScript. Scripts can't detect client events such as MouseButton1Down.
I'm super super sorry for the bother, It still doesn't seem to be working.. If it's okay maybe we can find another way to do the script or fix this issue because i'm pretty clueless right now to be honest.. I changed it to a local script but still doesn't work.. The block doesn't even move