#How do i make it so you need to wait before getting up?
1 messages · Page 1 of 1 (latest)
local bike = script.Parent.Bike.Value
local localPlayer = game.Players.LocalPlayer
local character = localPlayer.Character
function flipped()
while wait() do
if bike.DriveSeat.CFrame.upVector.Y < 0.3 then
character.Humanoid.Jump = true
task.wait(0.1)
character.Humanoid.Sit = true
task.wait(0.1)
character.Humanoid.JumpHeight = 0
task.wait(3)
character.Humanoid.JumpHeight = 7.2
end
end
end
bike.DriveSeat.ChildAdded:Connect(flipped())
bike.DriveSeat.ChildAdded:Connect(flipped()) youre running flipped() immediately and its gonna pass its return value (nil) to connect
pass the function without the parentheses
and youre also forcing sit
yeah
It needs to force a sit
Basically this scripts works like
when you fall off your bike
you get into sit
so you slide a little
and i want it so that after like 4 seconds you can get up
im a very new scripter maybe you can tll
listen to the seat not the bikes cframe
and fix the infinite loop i pointed out earlier
yeah i gotta figure out how to do that holdon
Wait i dont get that?>
the cframe is supposed to tell when your wheelie is too far tilted
so when youre too far tilted back you fall off
and then you get into the sit animation so you cant move
instead of checking the bikes cframe over and over to guess when something went wrong, listen to the actual seat to tell you when the players gets on and off
if bike.DriveSeat.CFrame.UpVector.Y < 0.3 then
youre constantly polling and guessing the bike flipped
GetPropertyChangedSignal("Occupant")
i might be wrong about that
i havent touched a seat in the past 5 years
oh