The sign probably isn’t anchored.
Thats working but, not like I want
I want the sign like have an effect of the wind like the first video
The primarypart is the handler
No, the sign is not anchored but it still doesnt want to move…
Is the Handler part anchored or unanchored?
no, the sign part is not anchored
Could you sent a RBXM of the sign so we can debug better?
u cant move models just by tweening their primary part
local TweenService = game:GetService("TweenService")
local part = game.Workspace:WaitForChild("Chapter2"):WaitForChild("Chapter")
local Tweeninfo = TweenInfo.new(
3,
Enum.EasingStyle.Sine,
Enum.EasingDirection.InOut,
-1,
true
)
local cframeValue = Instance.new("CFrameValue")
cframeValue.Value = part:GetPivot()
cframeValue.Changed:Connect(function(newCframe)
part:PivotTo(newCframe)
end)
local tween = TweenService:Create(cframeValue, Tweeninfo, {Value = part:GetPivot() * CFrame.Angles(math.rad(-50), 0, 0)})
tween:Play()
tween.Completed:Connect(function()
cframeValue:Destroy()
end)
also use body constraints or render stepped if u want repeated rotation
I’ve figured it out. Your script is manipulating the Orientation which apparently welds don’t correlate with. I changed the script to manipulate the CFrame and it works.
local tween = TweenService:Create(part.PrimaryPart, Tweeninfo, {CFrame = part.PrimaryPart.CFrame * CFrame.Angles(math.rad(-50), 0, 0)})
Yes, thats working, thank you
You can tween models if everything in the model is unanchored and welded to the anchored PrimaryPart.
But thats what I did in the model but the sign didnt want to move
Just wondering, why are you creating a CFrameValue instead of just setting the cframe as a variable?
tracking variable changes is a hassle
You don’t need to track any changes at all, just this works without all the unnecessary stuff.
local tween = TweenService:Create(part.PrimaryPart, Tweeninfo, {CFrame = part.PrimaryPart.CFrame * CFrame.Angles(math.rad(-50), 0, 0)})
doesnt work if it aint welded which i already addressed so dont see ur point?
fyi this how i would do this
local rotationSpeed = math.rad(50)
RunService.RenderStepped:Connect(function(dt)
part:PivotTo(part:GetPivot() * CFrame.Angles(rotationSpeed * dt, 0, 0)
end)
nice and simple
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.