So basically I'm making a test car place and how you control it is by a GUI. I've inserted a Script into the GUI, and then I've inserted the piece of code below. But for some reason, it doesn't operate at all. No errors, no anything. There is more than one script in my thing. But the other script is only to control the car. Here is my code:

game.Players.PlayerAdded:Connect(function(player)
if not player.UserId == game.CreatorId then
	script.Parent:Destroy()
end
end)

I don't get why, but it's not working. All help is appreciated.

2 comments

0

Because you're checking to see if somebody that isn't you is joining, which is apparently never happening? No, seriously. If you're doing this in Studio and you're not in Team Create, there's your answer.

0

Gosh, ok then.