Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

this short script doesn't work?

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

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

1 answer

✓ Accepted answer
local player = game.Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
while playerGui do
if script.Parent.Parent.TeamColor = BrickColor.new("New yeller")
then
wait(.05)
script.Parent.ScreenGui.Scores.Main.Visible = false
end
end

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.