I made a self destruct script that unanchors any parts in the game. Here is the script:
function onChatted(msg, recipient, speaker)
-- convert to all lower case
local source = string.lower(speaker.Name)
msg = string.lower(msg)
if (msg == "selfdestruct") and speaker.Name == "Wizardel" or "MoffatKiller" or "Player" then
local p = game.Workspace:GetChildren()
for i = 1,#p do
if p:IsA "Part" then
p[i].Anchored = false
end
end
end
end
function onPlayerEntered(newPlayer)
newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end)
end
game.Players.ChildAdded:connect(onPlayerEntered)
THe output says "IsA is a nil value" Can someone help?

1 comment
Thanks a lot, this really helped.