Hello,
I am currently creating a roleplay game and I am scripting a train system for it. I have the whole system down but I am struggling to figure out how to script the rotation of the turnstile.
I want it to rotate as it would however I’m not sure how to do it so that it doesn’t do this:
TweenService = game:GetService("TweenService")
spininfo = TweenInfo.new(20,Enum.EasingStyle.Linear) -- 20 is the rotation time
Spin1 = TweenService:Create(script.Parent,spininfo,{CFrame = script.Parent.CFrame * CFrame.Angles(0,math.rad(120),0)}) -- you can change the X Y Z rotations here
Spin1:Play()
Use a HingeConstraint | Roblox Creator Documentation on the turnstile and a plate on the floor with a script that rotates the HingeConstraint 120 degrees each time the plate is touched.