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 3 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 3 years ago

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

part.Touched:Connect(function(Hit)
    if Hit.Parent:FindFirstChildOfClass("Humanoid") then
        local Character = Hit.Parent
        Character.HumanoidRootPart.Anchored = true
        Character.HumanoidRootPart.CFrame = part.CFrame 
    end
end)

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

Ad
Log in to vote
0
Answered by 3 years ago
Edited 3 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

local Player = game.Players.LocalPlayer
repeat wait() until Player.Character
repeat wait() until Player.Character:FindFirstChild("Humanoid")
local StandAnim = Player.Character.Humanoid:LoadAnimation(script.Parent.Animation)
game:GetService("RunService").Heartbeat:Connect(function()
if Player.Character.Humanoid.Sit == true then
StandAnim:Play()
elseif Player.Character.Humanoid.Sit == false then
StandAnim:Stop()
end
end)

Answer this question