So i'm trying to a transformaton script (activated when used chat)
This is my script: function god() local Mouse = Player:GetMouse() local shirt = Player.Character:WaitForChild("Shirt") local pants = Player.Character:WaitForChild("Pants") shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=841007897" pants.PantsTemplate = "http://www.roblox.com/asset/?id=841019962" end
jun.Chatted:connect(function(Msg) local msg = Msg:lower() if string.sub(msg, 1, 7) == "destroyer" then wait(0.1) god() end if string.sub(msg, 1, 13) == "god" then wait(0.1) god() end if string.sub(msg, 1, 6) == "hakaishin" then wait(0.1) god() end if string.sub(msg, 1, 10) == "mortal" then wait(0.1) mortal() end if string.sub(msg, 1, 3) == "off" then wait(0.1) mortal() end end)
And i get this error: Players.ZuperZhadow.Backpack.LocalScript:9: attempt to index global 'jun' (a nil value)
Someone help? (Or if i'm wrong on this script then someone do one for me, it's just about changing clothes when you say the word "god" (without the " 's)

1 comment
Thank you, that helped. But now when i say the word "god" it doesn't change my clothes. (same code just added yours in it)