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

how can i make a seat with no animations?

Asked by 4 years ago

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!

2 answers

Log in to vote
4
Answered by 4 years ago

You could have a touched event on a normal part and just have the player weld or anchor to it.

1part.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
7end)

something similar to this, but keep in mind this is very unpolished.

Ad
Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

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

01local Player = game.Players.LocalPlayer
02repeat wait() until Player.Character
03repeat wait() until Player.Character:FindFirstChild("Humanoid")
04local StandAnim = Player.Character.Humanoid:LoadAnimation(script.Parent.Animation)
05game:GetService("RunService").Heartbeat:Connect(function()
06if Player.Character.Humanoid.Sit == true then
07StandAnim:Play()
08elseif Player.Character.Humanoid.Sit == false then
09StandAnim:Stop()
10end
11end)

Answer this question