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
8 years ago

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

Log in to vote
0
Answered by 8 years ago
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.

Ad

Answer this question