Need help with PlayerGui

If you want to use a server script then you can use remotes and :FireAllClients()… You can only use LocalPlayer on the client.

1 Like
local rep = game:GetService("ReplicatedStorage")
local event = rep.YourEventNameHere
local tv = workspace:WaitForChild("OldTvClone")
local package = workspace:WaitForChild("OldTvPackage")

if tv and package then
    event:FireAllClients()
    tv:Destroy()
else
    warn("warning")
end

Then run the rest of the code on a local script in StarterGui or something

local rep = game:GetService("ReplicatedStorage")
local event = rep.YouREvenTNamEHere

event.OnClientEvent:Connect(function()
    --Your code here
end)

Sorry im writing this on phone

game.Players.PlayerAdded:Connect(function(player)
    local tv = game.Workspace:WaitForChild("OldTvClone")
    local package = game.Workspace:WaitForChild("OldTvPackage")

    if tv and package then
        local oldtvtOOmuch = game.Workspace:WaitForChild("OldTvClone")
        oldtvtOOmuch:Destroy()
        local gui = player:WaitForChild("PlayerGui")

        gui.ErrorGui.ErrorLabel.TweenScript.Disabled = false
        wait(10)


        script.Disabled = true
        wait(3)
        script.Disabled = false
        script.Disabled = true
    else
        warn("warning")
    end
end

Try this lol

1 Like