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

How would I keep a player sat in a seat when the seats position is changed?

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)

Answer this question