Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does the GUI isn't a valid member of replicated storage ?

Asked by 4 years ago
local player = game.Players.LocalPlayer
local playergui = player:WaitForChild("PlayerGui")
local RubleGUI = game.ReplicatedStorage.RubleGui
while true do 
if not playergui:FindFirstChild(RubleGUI.name) then
         wait(5)
      local clone = RubleGUI:Clone()
       clone.parent = playergui
       wait(3)
        clone:Destroy()
end
end

Im making a simple script where every 5 seconds a GUI pops up , but instead it says that 21:04:10.086 - RubleGui is not a valid member of ReplicatedStorage . I have the ScreenGui clearly inside the replicated storage . Can anybody help ?

0
Double check spelling QuantumPlasmic 84 — 4y

1 answer

Log in to vote
2
Answered by 4 years ago
Edited 4 years ago

:WaitForChild('obj')

Try using waitforchild, maybe it's not the solution but try it. It may not have loaded in yet!

CHEERS

Ad

Answer this question