When I tested my game in a server and a script tries to do something to the guis that came from startergui, it comes back saying that that gui doesn't exist. I fixed it via using a playeradded script to add the guis, but I'm wondering why it didn't work before? script e.g
poof = true function onClick(hit) if poof == true then poof = false wait() script.ImageButton.Name = script.name.Value script.Bandages.Parent = hit.PlayerGui.Inventory.Frame.ScrollingFrame script.Parent.Sound:Play() wait(0.5) script.Parent:Destroy() end end script.Parent.ClickDetector.MouseClick:connect(onClick) wait(30) script.Parent:Destroy()
try this!
poof = true function onClick(hit) if poof == true then poof = false wait() script.ImageButton.Name = script.name.Value script.Bandages.Parent=game.Players[hit.Name]PlayerGui.Inventory.Frame.ScrollingFrame script.Parent.Sound:Play() wait(0.5) script.Parent:Destroy() end end script.Parent.ClickDetector.MouseClick:connect(onClick) wait(30) script.Parent:Destroy()