I am trying to make an admin command system but, I can't seem to get anything to work! Here are a couple examples:
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
if(msg == ":explode") then
local splode = Instance.new("Explosion")
splode.Parent = player.Torso
splode.BlastPressure = 500000
splode.BlastRadius = 4
splode.DestroyJointRadiusPercent = 1
splode.ExplosionType = "Craters"
splode.Visible = true
splode.Archivable = true
end
end)
end)
-- Breaks the chat
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
if msg == ":explode" then
local splode = Instance.new("Explosion")
splode.Parent = player.Torso
splode.BlastPressure = 500000
splode.BlastRadius = 4
splode.DestroyJointRadiusPercent = 1
splode.ExplosionType = "Craters"
splode.Visible = true
splode.Archivable = true
end
end)
end)
-- Also breaks the chat
I've tried and tried but nothing is working!
If someone could give me some sort of tutorial (As tutorials I've tried are most likely outdated because they don't work) in the answers that would be very appreciated thank you!
-Aidan

4 comments
What you mean under ,,Breaks the chat"?
It doesn't let me chat
is this a serverscript or a localscript
Test it in game and not in studio, there seems to be issues with using the chat in studio.