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

The Player Removing In Built event does not work at all in-game, why is that?

Asked by
Nootian 184
4 years ago

This Game event does not work AT ALL in-game but works in roblox studio

Normal Script:

game.Players.PlayerRemoving:Connect(Remove)

^^^^^^^Snippet

-The Name variable carrys the name and Device1.Person is a textbox, (The name is also a string) -The event checks if the player has left

-What i am looking for is, The Event is not working but only in roblox studio it works, and the rest of the code already works

function remove()
--Name variable
 name = game:FindFirstChild("ReplicatedStorage").SurfaceGui.Device1.Person.Text
    if workspace:FindFirstChild(name) == nil then
        workspace:FindFirstChild("Device1").Billbourd.BillboardGui.TextBox.Text = ""
        game:FindFirstChild("ReplicatedStorage").SurfaceGui.Device1.Text = "off"
        game:FindFirstChild("ReplicatedStorage").SurfaceGui.Device1.Person.Text = ""
    end
end
--event
game.Players.PlayerRemoving:Connect(remove)
0
Don't repost every hour hiimgoodpack 2009 — 4y
0
sorry Nootian 184 — 4y
0
Im just getting desperate. Nootian 184 — 4y

Answer this question