Im trying to make a kick system based on placeid
my work:
if game.PlaceId == "6666943197" then
print("confirmed")
else
game.Players.LocalPlayer:Kick("unconfirmed")
end
it has no error but it does not work
Im trying to make a kick system based on placeid
my work:
if game.PlaceId == "6666943197" then
print("confirmed")
else
game.Players.LocalPlayer:Kick("unconfirmed")
end
it has no error but it does not work
What type of script is this and where is it located? Also PlaceId
returns a number, so remove the quotation marks between "6666943197"
Try this:
if game.PlaceId == 6666943197 then
print("confirmed")
else
game.Players.LocalPlayer:Kick("unconfirmed")
end
PlaceId is a number, not a string, meaning PlaceId will never be “6666943197”
still not working script on workspace
it is a script on workspace and
i made it without it but still
If you’re using a local script then put it inside a playerscripts, also local player doesn’t work on normal scripts, if it’s a normal script then copy this code, create a localscript in playerscripts and paste it. (You can also use a normal script and use the PlayerAdded event to manage joins and kicks.)
Localscripts do not work in workspace
, put it somewhere to where it can work, suchas StarterPlayerScripts
Ah! I’m assuming it’s a ServerScript then, try this:
game.Players.PlayerAdded:Connect(function(player)
if game.PlaceId == 6666943197 then
print("confirmed")
else
player:Kick("unconfirmed")
end
end)
Edit: Yay! My first dev fourm solution!