Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Is there a Child Left?

Is there a ChildLeft? I want to remove the gui when the play gets out of the Car

db = true
Seat = script.Parent
Seat.ChildAdded:connect(function(child)
if child then
	
if child.Name == "SeatWeld" and db then
db = false
script.GUI:Clone().Parent = game.Players:GetPlayerFromCharacter(child.Part1.Parent).PlayerGui
wait(3)
db = true
end
end
end)

1 answer

What do you mean? When a players sits, it adds a SeatWeld, the SeatWeld is then removed when the player jumps out of the seat, you can use the ChildRemoved function, then you just need to check the name of the child that's been removed is SeatWeld, then you can find the player and remove the GUI from his PlayerGui.

This discussion is preserved as it was. New answers, comments, and votes are closed.