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

How do I keep the player sat on a seat when the seat's position is altered via script?

Asked by
Nidoxs 190
9 years ago

How would I do this? When I change the position of the seat while sat on it through properties it works but if I try to move the seats position with a script it will dismount me off the seat and go to its new position please help. Here is the weld script:

function onChildAdded(child)
    if child.Name == "SeatWeld" then
        child.C0 = CFrame.new(0,(script.Parent.Size.y/2 + 1),0)
        child.C1 = CFrame.new(0,0.3,0)
    end
end

script.Parent.ChildAdded:connect(onChildAdded)

0
Did you move the seat by setting it's CFrame (which doesn't snap joins) or it's Position (which does snap joints)? BlueTaslem 18071 — 9y

Answer this question