I have the follow script in startgui > ScreenGui > TextButton > LocalScript
script.Parent.Activated:Connect(function() game.Workspace.Rocket.Boosters1.Velocity=game.Workspace.Rocket.Boosters1.CFrame.lookVector * 700 game.Workspace.Rocket.Boosters2.Velocity=game.Workspace.Rocket.Boosters2.CFrame.lookVector * 700 game.Workspace.Rocket.Boosters3.Velocity=game.Workspace.Rocket.Boosters3.CFrame.lookVector * 700 game.Workspace.Rocket.Boosters4.Velocity=game.Workspace.Rocket.Boosters4.CFrame.lookVector * 700 end)
whenever I click the button the rocket does not launch, anyone know how to fix this?
According to the DeveloperWiki, .Activated
fires when a GUIButton is selected when pressing A
. I don’t think this is the best method for listening for Click Signals. It’s best to use .MouseButton1Click
instead, as it’s fully built to listen for Left-Click interaction with the Button.
local Button = script.Parent Button.MouseButton1Click:Connect(function() print("Clicked!") end)
You can use this and apply your Code accordingly, if this helps, don’t forget to accept this answer!