I'm trying to do a script that removes the Gui "Backpack Gui" from all players after 5 seconds, i know, the infinite yield its not an ERROR, but it seems to never found!
Here's the script [It's just a resume of what I'm really trying to do]
for _,player in pairs(game:GetService("Players"):GetPlayers()) do local BPGui = player.PlayerGui:WaitForChild("Backpack Gui") wait(0.1) BPGui:Destroy() end
Only the client (player) can access the gui. If you want the server to be able to access the GUI, clone it and set it's parent to the player's PlayerGui.
Server script:
--store the backpack gui in serverstorage or wherever you want local BackpackGUI = game.ServerStorage["Backpack Gui"] game.Players.PlayerAdded:Connect(function(newPlayer) newPlayer.CharacterAdded:Connect(function(character) local guiClone = BackpackGUI:Clone() guiClone.Parent = newPlayer.PlayerGui end) end)