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

:SetPrimaryPartCFrame() destroys attachments on client only?

Asked by
katclap 24
3 years ago
Edited 3 years ago

Hello! First of all, Thanks for taking a look at this! I'm creating a ferris wheel, and after some failed attempts (ahem... https://gyazo.com/69901a4b179befcfdd3d19c41526634b) I was able to make a ferris wheel function normally. I used parts on each side of the cart and on where the hinges to the wheel should be and named them "Hinge". They have attachments and use WeldConstraints to hold the cart in the wheel. It looks great on server but on client the seats freeze...

Here's a demonstration (Ignore the awkward rotation I fixed that) https://gyazo.com/7a26e361ea2946f8e38254d02972bd42

Here's my short code:

local speed = 2 
local rotation = 0


while(wait())do
    rotation = 0+(speed/5)
    if(rotation>360)then rotation = 0 end
    script.Parent:SetPrimaryPartCFrame(script.Parent.MainPart.CFrame*CFrame.Angles(math.rad(rotation),0,0))
end

What am I doing wrong?

-Thanks, katclap

Answer this question