Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

this short script doesn't work?

Asked by
roquick 41
9 years ago

its suppose to hide a frame if a player is in team New yeller but it doesn't work please help

1local player = game.Players.LocalPlayer
2local playerGui = player:WaitForChild("PlayerGui")
3        if script.Parent.Parent.TeamColor == BrickColor.new("New yeller") then
4         wait(0.05)
5            script.Parent.ScreenGui.Scores.Main.Visible = false
6        end

1 answer

Log in to vote
0
Answered by 9 years ago
1local player = game.Players.LocalPlayer
2local playerGui = player:WaitForChild("PlayerGui")
3while playerGui do
4if script.Parent.Parent.TeamColor = BrickColor.new("New yeller")
5then
6wait(.05)
7script.Parent.ScreenGui.Scores.Main.Visible = false
8end
9end

I'd like to notice that you did wait for playerGUi, but also that you did not use the variable. If you are not gonna use a variable then do not use it. Yet, since you did use it. The script should work if main is infact a scrolling frame, otherwise it will not work no matter how much code ya do, because screen gui does not have any properties to really play with.

Ad

Answer this question