This GUI script is supposed to make the GUI visible to teammates when a value in Workspace is true.
However, the script isn't working, and I have no idea why. Output gave me nothing, and everything is defined.
Can someone please help me?
Here's the script:
local Player = script.Parent.Parent.Parent.Parent
while not game.Workspace.S_List:findFirstChild("Satellite") do wait(.1) end -- same for streak
game.Workspace.S_List.Satellite.Changed:connect(function(v) --creating this connection line assigns the function inside of it to fire every time Streak changes its value; instead of just the one time.
if v == true then
local pp = game.Workspace.S_List.Satellite:WaitForChild("Player")
if pp.Value.TeamColor == Player.TeamColor then
script.Parent.Visible = true
end
elseif v == false then
script.Parent.Visible = false
end
end)
