Hello devs I need help with a script it keeps displaying this warning or bug message when I load the game
The Radio UI is in the teams that only get that UI
This is the script I am using for my Dealership were I want to disable the GUI and reenabled after closing the dealership GUI but it does not work only works when I place the radio GUI in the SG and start but it needs to be in teams
will it needs to be in gui folder and placed in teams but I want it to allow me to trigger the dealership on and off if the person is on the team or not
Right, but the error is saying that thereās an infinite yield occurring when trying to wait for āRadioUIā in āPlayerGui.ā This error only occurs when itās waiting for something that does not even exist which means that RadioUI is not in PlayerGui.
In your blur script on line 2 it reads:
local Radio = script.Parent.Parent:WaitForChild("RadioUI")
Iām not exactly sure where this BlurScript is located, but regardless, this line is attempting to find the UI in a place where it isnāt located.
I have a couple of questions myself: where is the RadioUI? Is it being cloned or moved into PlayerGui? Or does it just stay in the Teams?
I would simply put RadioUI in StarterGui, turn off the ResetPlayerGuiOnSpawn property and attach a local script inside it that only opens/closes if a person is on a certain team.
--// Vars
local LocalPlayer = game.Players.LocalPlayer
local TeamService = game:GetService("Teams")
local PoliceTeam = TeamService:WaitForChild("Police")
function CheckTeam()
if LocalPlayer.Team == PoliceTeam then
-- code here
end
end)
CheckTeam() -- runs the function when the player joins
LocalPlayer:GetPropertyChangedSignal("Team"):Connect(CheckTeam) -- runs the function if the player changes team
so basiclly i want it to disable the radio GUI when the player is in the dealership GUI and after they leave the GUI reenables.But I want it to work if the player has the gui or not the gui is in teams the team that it is in is the team that use that gui or team and then it gets cloned to startergui
i know but it says infinite yield because itās waiting for an āobjectā that doesnāt exist in the first place, the difference is that thereās an extra āParentā
but the dealership gui will reenable the radio GUI after so if I put it in starter GUI the players will get the radio GUI even if not on the team I have tried enabled and disable but it need to only enabled and disable if the player is on that team