Hi, I just created a script which only a certain person can regen a model/part by saying ":regen". When I tried it out, the script did not work. The script is not a LocalScript. It is a in a NormalScript.
-- onChatted regen script by PlayingOBC
Master = "PlayingOBC" -- Player who can use ":regen" command
model = game.Workspace.Regenerator -- Name of the model which needs to be regen.
backup = model:clone()
function onChatted(msg, recipient, speaker)
local source = string.lower(Master.Name)
msg = string.lower(msg)
if (msg == ":regen") then
model:remove()
model = backup:clone()
model.Parent = game.Workspace
model:makeJoints()
end
end
function onPlayerEntered(newPlayer)
Master.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, Master) end)
end
game.Players.ChildAdded:connect(onPlayerEntered)
Please let me know what error I did. Thank you for reading/helping! :)

3 comments
Thank You for your help! :)
You don't actually help people with these answers, you just make them scripts that work. -rep
with comments of how it works, nice