Trying to detect if player is not already in a certain CFrame

Mooney, it doesn’t seem to be working at all, it keeps rotating my player even when it’s already been rotated here the code

local tab = {}
		if tab[humrp] ~= "Rotated" and Climbing then
			tab[humrp] = "Rotated"
			local Tween = TweenService:Create(humrp, TweenInfo.new(.2, Enum.EasingStyle.Cubic), {CFrame = (humrp.CFrame * CFrame.Angles(0,0,math.rad(-90)))})
			Tween:Play()
			print("Rotated")
		end

this is because you cannot reset the tab variable every time you fire the event to rotate it. Look where i put

--event

in the code above.

The tab variable never gets reset to tab = {} unless you want to allow all of the rootparts to be rotated again.

1 Like

So I have to put “tab = {}” out of the User Input Condition?

just send me the code and ill fix it

IT WORKED! Thanks mooney it actually worked!

Thanks for all your patience and helping I really appreciated it, can’t thank you enough :yum:

Hey, could I contact you if I ever need help with something?

Oh yeah. I have discord it’s xurmx#2125