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

how to determine which object to sit on?

Asked by 4 years ago
Edited 4 years ago

I am making a game where the user has to catch a bicycle and then he can ride on it. But I am confused! The Humanoid.SeatingPart isn't writable and as expected, the player is tripping. What to do? Below is my code.

local bike = game.Workspace.bicycle

local function onPartTouched(otherPart)
    local character=otherPart.Parent
    local humanoid=character:FindFirstChildWhichIsA("Humanoid")
    if humanoid then
        humanoid.Sit=true
    end
end
bike.Touched:Connect(onPartTouched)

Is there no other way than to make a seat part?

1 answer

Log in to vote
0
Answered by 4 years ago

When I Was Trolling My Friend, Humanoid.Sit Only Makes The Humanoid Sit But Not Permanently Like A Seat. Try Using A Seat Part. Idk If This Works. Just My Theory.

Ad

Answer this question