u_5g
(u_5g)
#1
I made a script a while back and have been trying to figure out this problem.
script.Parent.CFrame = CFrame.new(q.p+Vector3.new(0,script.Parent.Size.Y/2,0))*CFrame.Angles(0,0,math.pi/2*math.sin(math.rad(i)))*CFrame.new(0,script.Parent.Size.Y/2,1)*CFrame.Angles(0,math.pi/2,math.pi)
When the script is in a part it swings amazingly but I can no longer rotate the part.
Does anyone know why?
2 Likes
antojensob
(antojensob)
#2
I think this is the wrong category, I would try to go to Scripting Support, they should probably help.
3 Likes
u_5g
(u_5g)
#3
Oops, wasn’t paying attention. Thank you for letting me know.
2 Likes
You’re most probably setting the CFrame every frame. Then you are actually rotating the part, but it rotates back to position from the script.
2 Likes
CoderHusk
(CoderHusk)
#5
You need to add a delta change (see maximas in pre calculus) instead of explicitly declaring it.
4 Likes