So I am making admin commands and they work fine in roblox studio but when I try to use them in like Script Builder or My game they don't work...
Script:
local Admins = {["silverminer226"] = true, ["Player"] = true, ["RLuaScripting"] = true}
function onChatted(message, player)
if message == "create/Part" and Admins[player.Name] then
a = Instance.new("Part", workspace)
end
end
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(message) onChatted(message, player) end)
end)
I asked some people and they said it needed to be client sided and I have no clue how to do that xD

5 comments
It means use a localscript ._.
Don't work :P
You can't make it a LocalScript because it uses game.Players.PlayerAdded event. You need to record chats from the Local Player.
I'll try that.
There are some things that could be better but I see nothing that would prevent it working.