Trying to make an admin. Have I made a mistake? Is it in the wrong place? (StarterGui)
local List = {["Player1"] = true, ["Player1"] = true } -- allowed admins
local Prefix = "/" -- kill/Player1
Target = nil
function FindPlayer(userName)
for _, Player in ipairs (game.Player:GetPlayers()) do
if string.lower(Player.Name) == string.lower(userName) then
return Player
end end end
game.Players.PlayerAdded:connect(fucntion(userJoined)
userJoined.Chatted:connect(function(Message)
Message = string.lower(Message)
if Message:sub(1,5) == "kill"..Prefix and List[userJoined.Name] then // kill/me
if Message:sub(6) == "me" then Target = userJoined
else Target = FindPlayer(Message:sub(6))
end
if Target and Target.Character then
Target.Character:BreakJoints()
end end end) end)

3 comments
EDIT: Changed from UUUUUUU to Why does this happen?
the heck is up with your tabbing and spacing D: D: D: D: D: D: D: D: D: D: D: D:
Well... I copied it from the video I was watching. I did think: the heck?