StarterGui just replicates the UI to the player, you have to get the player and do ".PlayerGUI
Everyone, you can use normal scripts to change the players UI.
StarterGui just replicates the UI to the player, you have to get the player and do ".PlayerGUI
Everyone, you can use normal scripts to change the players UI.
already made a script for him like you mentioned, but he said he already tried that and its not working.
I tried it out, but it still didn’t work…
If someone would like to take a look (I would greatly appreciated it) here’s what I made.
Workspace:
Part
Insert script into Part.
(This is the script I have been editing.)
StarterGui:
ScreenGui titled: Boosters
inside ScreenGui, Frame.
Inside Frame, TextLabel titled: SpeedBoost
This is what was in the script:
script.Parent.Touched:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if humanoid and plr then
humanoid.WalkSpeed = 32
plr.PlayerGui.Frame.Boosters.SpeedBoost.Visible = true
print("Speed Boost Active")
wait(math.random(7, 15))
humanoid.WalkSpeed = 16
plr.PlayerGui.Frame.Boosters.SpeedBoost.Visible = false
print("Speed Boost Unactive")
end
end)
That is fine, this should work 100%
Why you reference Frame before Boosters ? In:
plr.PlayerGui.Frame.Boosters.SpeedBoost.Visible = true
So I deleted the frame entirely, and just put the TextLabel into the “Boosters” ScreenGui, and I edited the script and now it works.
Thank you everyone!
I deleted the frame and now it works. Thanks!
Nice. You could also leave like it was but doing like this:
plr.PlayerGui.Boosters.Frame.SpeedBoost.Visible = true
OMG YOUR RIGHT DUDE I had the frame before
This was the issue all along
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.