Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I tween currentangle of motor6d?

Asked by 6 years ago

Hello, so I am a scripter myself. I work with tweens and for some weird reason motor6d's CurrentAngle ONLY want to get tweened in studio play. As fast as I go out of studio play it for some reason won't tween it at all.

Anybody got a solution for this? Thank you. (I contacted many other scripters and none got it to work. Even UltraW, Resturant Tycoon owner told me it should work. It works with everything else than Motor6D CurrentAngle.)


local laser1 = game.workspace.Sharpy_1.Pan --- This row below with local tween = function should all be one thing but don't fit in one row in scripting helpers website. --- local tween = function(itemtotween,property,value,tweentime,easingstyle,easingdirection) local info = TweenInfo.new( tweentime, Enum.EasingStyle[easingstyle], Enum.EasingDirection[easingdirection], 0, false, 0 ) local goal = {} goal[property] = value return game:GetService("TweenService"):Create(itemtotween,info,goal) end function OnClick(Player) tween(laser1,"CurrentAngle",-1,3,"Quad","InOut"):Play() laser1.DesiredAngle = -1 end script.Parent.ClickDetector.MouseClick:connect(OnClick)

Answer this question