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

7 comments
Try cloning the gui into PlayerGui.
The GUI is on The StarterGUI, So it gets cloned to playerGUI.
If the game is filtering enabled, it'll be much more difficult to get the server to enable the gui. What I would do is make the gui already enabled then clone the gui into the player when they touch the part.
But, How do i do that?
I'll try to post an answer
Try the code I edited for you, if it doesn't work tell me.
And make sure the gui is in the part.