Tween isn't playing

I have a crystal welded to a player’s torso via Motor6D. I have a tween playing to rotate the crystal 360 degrees (120 degrees ever 0.5 seconds) indefinitely. the issue is that the crystal isn’t moving. I’ve added a Print to confirm if it’s playing in the first place but it is printing, but there’s still no movement from the crystal.

I’ve tried to change the axis of rotation, i’ve made sure that none of the parts are anchored which may prevent it, none of them are.

help would be appreciated

script:

TS = game:GetService("TweenService")
TI = TweenInfo.new(0.5,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0)
TI2 = TweenInfo.new(4,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0)

S1 = {CFrame = CFrame.Angles(math.rad(120),0,0)}
S2 = {CFrame = CFrame.Angles(math.rad(140),0,0)}
S3 = {CFrame = CFrame.Angles(math.rad(360),0,0)}

Spin1 = TS:Create(script.Parent.model,TI,S1)
Spin2 = TS:Create(script.Parent.model,TI,S2)
Spin3 = TS:Create(script.Parent.model,TI,S3)

while true do
	wait()
	Spin1:Play()
	wait(0.5)
	Spin2:Play()
	wait(0.5)
	Spin3:Play()
	wait(0.5)
	print("Done")
end

is ‘script.Parent.model’ an actual Model object, or a Part?

If you haven’t checked the Output window you probably have an Error saying CFrame is not a valid member of Model.

By the way, you don’t need using loops with tweens as there’s a repeating value.

TS = game:GetService("TweenService")
TI = TweenInfo.new(
	1.5,							-- Time to Complete
	Enum.EasingStyle.Linear,		-- Easing Style
	Enum.EasingDirection.InOut,		-- Easing Direction
	9999,							-- repeat count
	false,							-- reverse
	0								-- delay time
)

S1 = {
	CFrame = CFrame.Angles(
		math.rad(360),			-- X / Pitch
		0,						-- Y / Yaw
		0						-- Z / Roll
	)
}

TS:Create(script.Parent,TI,S1):Play()

As regards Tweening Models, here’s a Resource on the subject
Introduction to Tweening Models - Resources / Community Tutorials - DevForum | Roblox

1 Like

the parent is a model, the part named “model” is a basepart (mesh) i forgot to rename it

Models do not have a CFrame property directly under them as they do not represent a physical instance, more of a holder for a collection of instances.

Since you’re working with a Motor6D, you should weld all of the parts in your crystal model to a main part in your crystal model and then tween the Motor6D’s CFrame properties to create the effect you want.

Take a look at the properties of Motor6Ds here:

Suggestion:

local Model = script.Parent.model

--weld parts in the model here and then continue with this:

local Motor6D = --wherever the motor6d is

TS = game:GetService("TweenService")
TI = TweenInfo.new(0.5,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0)
TI2 = TweenInfo.new(4,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0)

S1 = {C1 = CFrame.Angles(math.rad(120),0,0)}
S2 = {C1 = CFrame.Angles(math.rad(140),0,0)}
S3 = {C1 = CFrame.Angles(math.rad(360),0,0)}

Spin1 = TS:Create(Motor6D,TI,S1)
Spin2 = TS:Create(Motor6D,TI,S2)
Spin3 = TS:Create(Motor6D,TI,S3)

while true do
	wait()
	Spin1:Play()
	wait(0.5)
	Spin2:Play()
	wait(0.5)
	Spin3:Play()
	wait(0.5)
	print("Done")
end
1 Like

Ok i’ll try tweening the Motor6D’s properties, ill be back with results

I usually just brushed past that without thinking about it, thanks for telling me

I take it you have successfully remedied your issue? :slight_smile:

yeah, it works perfectly now. thanks for the help!

1 Like