Hi. Thanks for the help. I am making a Simple Admin Script using chatted events. I am testing it by making a command where it gives u a bighead just to test it. There was 2 things wrong with it anything u said it would give u a bighead and Its not supposed to do that. 2. The admin didn't work because anyone could do it. So heres the script:)
local Admins = {"iSvenDerp"} function checkAuthority(name) for a,v in pairs(Admins) do if v == name then return true end end return false end game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) if msg == "bighead" or "Bighead" then player.Character.Head.Mesh.Scale = Vector3.new(3,3,3) end end) end)
Your problem is that you're not calling the function at all. Also, for being able to say anyword, you didn't restate your condition. If you have it say:
if msg="bighead" or "Bighead" then
it's pretty much saying if the string "Bighead" is true, then allow it. To fix that, you need to completely restate the condition.
Here's a pretty simple fix:
local Admins = {"iSvenDerp"} function checkAuthority(name) for a,v in pairs(Admins) do if v == name then return true end end return false end game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) if (msg == "bighead" or msg == "Bighead") and checkAuthority(player.Name) then --Called the function and restated condition player.Character.Head.Mesh.Scale = Vector3.new(3,3,3) end end) end)
So that's pretty much it. You had everything else correct, you just needed to call the function for it to work right.
Anyways, if you have any further problems/questions, please leave a comment below. Hope I helped :P