I'd looked at your title and i'm guessing you are searching for something like this.
1. Copy the script.
2. read the stuff on the script.
3. Message me if it doesn't work.
model = game.Workspace.FlapJack-- this is for the regeneration piece
model2=game.Workspace.DoorZ --this is the door
backup = model:clone()
function onChatted(msg, recipient, speaker)
-- convert to all lower case
local source = string.lower(speaker.Name)
msg = string.lower(msg)
if (msg == "reset") then
model:remove()
model = backup:clone()
model.Parent = game.Workspace
model:makeJoints()
end
if (msg == "start") then
model2.CanCollide = false
model2.Transparency = 1
end
if (msg == "close") then
model2.CanCollide = true
model2.Transparency = .5
end
end
function onPlayerEntered(newPlayer)
newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end)
end
game.Players.ChildAdded:connect(onPlayerEntered) |