Studio giving me "Tween 'Tween' was cancelled: Variant cast failed" when ontouched function activates

  1. I want a series of tweens to player before player gets teleported to another location once a certain part is touched by a player

  2. My issue is that only 2 out of the 4 tweens that are supposed to play actually play. After those 4 tweens play 4 more tweens are supposed to play.
    Video Example:


(sorry about the music in the background)

My code:

	tween5:Play()
end)
tween2.Completed:Connect(function()
	tween6:Play()
	tween7:Play()
end)
tween7.Completed:Connect(function()
	white.ImageTransperancy = 0
	tween8:Play()
end)



door.Touched:Connect(function(player1)
	if debounce == true and player1 then
		tween1:Play()
		tween2:Play()
		tween3:Play()
		tween4:Play()
		debounce = false
	end
end)

and the rest is just variables and tweens
(the tweens are also supposed to change the player fov

  1. Things I have tried doing to fix it.
    1 getting rid of the debounce.
    2 renaming my variables
    3 renaming my instances
    4 changing it to a non local script
    5 setting bool reverse to true
    6 getting rid of the gui changing tween along with the playergui variable


Ive looked everywhere on the devforums and i cant find anything relating to my issue. I’ve also looked through the devhub

I cant even find anything related to my issue on google on google.
i also kindof think its a bug but im more convinced its just me not being very competent. :ohmy:

door.Touched:Connect(function()
	if debounce == true then
        debounce = false

		tween1:Play()
		tween2:Play()
		tween3:Play()
		tween4:Play()

        task.wait(1) --//Cooldown time
		debounce = true
	end
end)

I got rid of the player1 value because if you when the event is fired, there is always going to be a hit argument being passed through no matter what.

2 Likes