hello, Is there a way to stop warning from happening?
local function RenderStep()
if (workspace.RadioGamepassPrompt.Position - HumanoidRootPart.Position).magnitude < 10 then
ContextActionService:BindAction("PromptGamePassRadio",GamepassPormptRaidio,false,Enum.KeyCode.E)
else
ContextActionService:UnbindAction("PromptGamePassRadio")
end
if (workspace.LimterShopNpc.Raccoon.Head.Position - HumanoidRootPart.Position).magnitude < 7 then
ContextActionService:BindAction("RadioRaccon",RadioRaccon,false,Enum.KeyCode.E)
game.ReplicatedStorage.NPCCHAT.TalkNpcGuiShower:WaitForChild("RacconShowerUi").Parent = player:WaitForChild("PlayerGui")
else
ContextActionService:UnbindAction("RadioRaccon")
player:WaitForChild("PlayerGui"):WaitForChild("RacconShowerUi").Parent = game.ReplicatedStorage.NPCCHAT.TalkNpcGuiShower
end
if (workspace.NPC.JayNpc.HumanoidRootPart.Position - HumanoidRootPart.Position).magnitude < 10 then
ContextActionService:BindAction("JayMissons",JayMissons,false,Enum.KeyCode.E)
else
ContextActionService:UnbindAction("JayMissons")
end
end
RunService.RenderStepped:Connect(RenderStep)
Why are you hiding this warning? It doesnât affect you if youâre sure the instance will exist soon.
:WaitForChild() method warns when the argument timeOut isnât provided and the function exceeds more than 5 seconds, you can use the timeOut argument then check itâs not nil.
local function WaitForChildNoWarn(instance, children_name)
local children
repeat
children = instance:WaitFirstChild(children_name, 5)
until children
return children
end
WaitForChildNoWarn(player:WaitForChild("PlayerGui"), "RaccoonShowerUi")