Okay so I tried inputting code here that is supposed to kick but I keep getting errors that say "ServerScriptService.KickHandler:13: attempt to index nil with 'Kick'"
Server code: **local allowed = {"DevRhy", "tellophase"}
game.Players.PlayerAdded:Connect(function(player) for i, v in pairs(allowed) do if player.Name == v then script.RoKicker:Clone().Parent = player:WaitForChild("PlayerGui") end end end)
game.ReplicatedStorage.RemoteKickEvent.OnServerEvent:Connect(function(playerToKick) local p = game.Players:FindFirstChild(playerToKick) p:Kick("You have been kicked.") end) **
Local Code: local frame = script.Parent script.Parent.Buttons.KickPlayerButton.MouseButton1Click:Connect(function() if game.Players:FindFirstChild(frame.playerToKick.Text) then game.ReplicatedStorage.RemoteKickEvent:FireServer(frame.playerToKick) end end)
If you guys could help that would be appreciated.
