I was trying to make an admin commands script but i " ')' expeted (to close '(' at line 21) near <eof> a bit of the script:
--//Checks if the player is banned or not if Player.PlayerValues.IsBanned.Value == true then Player:Kick("You're Banned From This Game.") --//Reason for kick end end) Player.Chatted:connect(function(message) for i, AdminName in ipairs(Admins) do if Player.Name == AdminName then --//Commands\\-- --//Kill Command if message:sub(1, 6) == "/kill " then local TargetPlayer = game.Players:FindFirstChild(message:sub(7)) if TargetPlayer then local Character = TargetPlayer.Character if Character then Character.Humanoid.Health = 0 end end end
i also tryed to add
repeat wait() until error == nil
near the error but osent work
Your problem is that the end)
is not a part of an event.
You maybe thought that player:Kick() is a event, but it is a function (I believe), that makes you don't need to have an end)
So this is the fixed script,
--//Checks if the player is banned or not if Player.PlayerValues.IsBanned.Value == true then Player:Kick("You're Banned From This Game.") --//Reason for kick end Player.Chatted:connect(function(message) for i, AdminName in ipairs(Admins) do if Player.Name == AdminName then --//Commands\\-- --//Kill Command if message:sub(1, 6) == "/kill " then local TargetPlayer = game.Players:FindFirstChild(message:sub(7)) if TargetPlayer then local Character = TargetPlayer.Character if Character then Character.Humanoid.Health = 0 end end end
BTW
repeat wait() until error = nil
Cannot be used, you an error is not a value... Anyways,
GOOD LUCK!
IF THIS HELPED, PLEASE DONT FORGET TO ACCEPT THE ANSWER!