local replicated = game:GetService("ReplicatedStorage") local kickplayer = replicated:WaitForChild("KickPlayer") local player = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait() local objective1 = game.StarterGui.ScreenGui.Frame.Objective1 local objective2 = game.StarterGui.ScreenGui.Frame.Objective2 local objective3 = game.StarterGui.ScreenGui.Frame.Objective3 local objective4 = game.StarterGui.ScreenGui.Frame.Objective4
if objective1.Text == "------" and objective2.Text == "------" and objective3.Text == "------" and objective4.Text == "------"then function kickplayerfromgame() player:Kick("congrats") end
kickplayer.OnClientEvent:Connect(kickplayerfromgame)
end
im trying tomake it so when you click on multiple items itll kick you out of the game but i dont understand at all i really need help

4 comments
They are also trying to kick a player from the client
I know. That's why I added a comment next to the line.
its saying that screengui isnt valid?
It's not a valid member of PlayerGui? It means there is no child with the name "ScreenGui" in the PlayerGui. Did you rename the ScreenGui to something else? Double check it to make sure the name is the same; if it is, try using the WaitForChild method.