i know this is pretty much a request, but i havent been able to make a seat that doesn't make you actually sit down, but instead just stay still, with the character in the center of the seat (like someone would if they were sitting normally, just without an animation)
any help is greatly appreciated, thanks!
You could have a touched event on a normal part and just have the player weld or anchor to it.
1 | part.Touched:Connect( function (Hit) |
2 | if Hit.Parent:FindFirstChildOfClass( "Humanoid" ) then |
3 | local Character = Hit.Parent |
4 | Character.HumanoidRootPart.Anchored = true |
5 | Character.HumanoidRootPart.CFrame = part.CFrame |
6 | end |
7 | end ) |
something similar to this, but keep in mind this is very unpolished.
So what you would wanna do is make a standing Animation in repeat then make it play when the player is sitting Or set the Sit Animations in Animate to the Standing Animation
Example
01 | local Player = game.Players.LocalPlayer |
02 | repeat wait() until Player.Character |
03 | repeat wait() until Player.Character:FindFirstChild( "Humanoid" ) |
04 | local StandAnim = Player.Character.Humanoid:LoadAnimation(script.Parent.Animation) |
05 | game:GetService( "RunService" ).Heartbeat:Connect( function () |
06 | if Player.Character.Humanoid.Sit = = true then |
07 | StandAnim:Play() |
08 | elseif Player.Character.Humanoid.Sit = = false then |
09 | StandAnim:Stop() |
10 | end |
11 | end ) |