so i made this game where you have to get everything on a shopping list, then you completed the game, but when you collect all the items, im not sure how to kick the player out, i used the gui as the thing that kicks you out, heres the script: "
local player = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait() local objective1 = script.Parent.Objective1 local objective2 = script.Parent.Objective2 local objective3 = script.Parent.Objective3 local objective4 = script.Parent.Objective4
if objective1.Text == "------" and objective2.Text == "------" and objective3.Text == "------" and objective4.Text == "------"then
player:Kick("congrats, you got all the items on your shopping list!")
end
" it wont work. help?

2 comments
I edited my answer
Can you accept my answer?