script.Parent.Touched:connect(function(charTouched)
local character = charTouched.Parent --character
local player = game.Players:GetPlayerFromCharacter(character) --player
local clone = character:Clone()
clone.Parent = game.Lighting
character:Destroy()
wait(2)
clone.Parent = game.Workspace
character = clone
end)
I'm attempting to clone the player's character, store it in lighting, then destroy its current character. After 2 seconds, the clone goes into game.Workspace and then the character is set to clone. However, it states on line 6 that the variable for clone is a nil value. Why is this?
