Basically, im doing a Sonic Forces in roblox, and i have been programming the double boost, it getting triggered when a part is touched, And it stops after another part is touched, however, it also haves to trigger a GUI that tells you to click it, Increasing your double boost walkspeed by +10 (Regularly its 50, if you dont do anything)
I got all that made, exept for a part, The ScreenGUI Enabling to TRUE, Which haves to be done in the Double Boost Start script. This is the script i made.
local partclicked = 0 script.Parent.Touched:connect(function(part) if partclicked == 0 then partclicked = 1 --A animation should play here, dont worry, ill make it. if not part.Parent then return end local humanoid = part.Parent:FindFirstChild("Humanoid") if not humanoid then return end game.workspace.Boostsong.Playing = true humanoid.WalkSpeed = 0 --In this part of the script, The player's "DoubleBoostGUI" screengui should get activated. wait (6) humanoid.WalkSpeed = game.Workspace.BoostSpeed.Value game.Workspace.Boosting.Value = true wait(3) partclicked = 1 end end)
So, how do i trigger the gui?
Also, this is the screengui, just if us want to know how it looks: http://prntscr.com/j7js9i
local partclicked = 0 script.Parent.Touched:connect(function(part) if partclicked == 0 then partclicked = 1 --A animation should play here, dont worry, ill make it. if not part.Parent then return end local humanoid = part.Parent:FindFirstChild("Humanoid") local player = game.Players:FindFirstChild(humanoid.Parent.Name) -- check for player if not humanoid or not player then return end game.workspace.Boostsong.Playing = true humanoid.WalkSpeed = 0 local gui = script.Parent:WaitForChild("DoubleBoostGUI"):Clone() gui.Parent = player.PlayerGui--In this part of the script, The player's "DoubleBoostGUI" screengui should get activated. wait (6) humanoid.WalkSpeed = game.Workspace.BoostSpeed.Value game.Workspace.Boosting.Value = true wait(3) partclicked = 1 end end)