#Helping with laying pose animation and standing pose too

1 messages · Page 1 of 1 (latest)

fleet kettle
#

123455676 i don t know what to do

#

i make this animation right now

#

1 min

#

by here with looped

#

and by here with action

#

and now look here

#
local Seat = script.Parent
local Anim = script.Parent:FindFirstChildOfClass("Animation")
local LastAnim = nil

Seat:GetPropertyChangedSignal("Occupant"):Connect(function()
    if Seat.Occupant == nil and LastAnim ~= nil then
        LastAnim:Stop()
    else
        LastAnim = Seat.Occupant.Parent:FindFirstChild("Humanoid"):LoadAnimation(Anim)
        LastAnim:Play()
    end
end)

here is the script

humble plinth
#

Here

#

local bedSeat = script.Parent
local sleepAnim = bedSeat:FindFirstChildOfClass("Animation")
local activeTrack = nil

if not sleepAnim then
warn("Missing sleep animation in bed seat.")
return
end

bedSeat:GetPropertyChangedSignal("Occupant"):Connect(function()
local sitter = bedSeat.Occupant

if activeTrack then
    activeTrack:Stop()
    activeTrack = nil
end

if sitter then
    local humanoid = sitter.Parent:FindFirstChildOfClass("Humanoid")
    if humanoid then
        local animator = humanoid:FindFirstChildOfClass("Animator")
        if not animator then
            animator = Instance.new("Animator")
            animator.Parent = humanoid
        end

        activeTrack = animator:LoadAnimation(sleepAnim)
        activeTrack.Priority = Enum.AnimationPriority.Action
        activeTrack:Play()
    end
end

end)

fleet kettle
#

same thing

humble plinth
#

Try this code i changed the animation from core to action in the code so u dont have to re upload

#

U changed it?

fleet kettle
#

yes

humble plinth
#

Show output

fleet kettle
humble plinth
#

No like the output go to view

#

And press output

#

Then play the game i want to see what it prints

fleet kettle
#

ok

#

i mean here is everything

humble plinth
#

Whats the animation id

fleet kettle
#

rbxassetid://72129294159810

mild lakeBOT
#

studio** You are now Level 2! **studio

humble plinth
#

Try this

local bedSeat = script.Parent
local activeTrack = nil

-- Create the animation instance in code
local sleepAnim = Instance.new("Animation")
sleepAnim.AnimationId = "rbxassetid://72129294159810"

bedSeat:GetPropertyChangedSignal("Occupant"):Connect(function()
local sitter = bedSeat.Occupant

-- Stop any currently playing animation
if activeTrack then
    activeTrack:Stop()
    activeTrack = nil
end

if sitter then
    local humanoid = sitter.Parent:FindFirstChildOfClass("Humanoid")
    if humanoid then
        local animator = humanoid:FindFirstChildOfClass("Animator")
        if not animator then
            animator = Instance.new("Animator")
            animator.Parent = humanoid
        end

        -- Load and play the animation
        activeTrack = animator:LoadAnimation(sleepAnim)
        activeTrack.Priority = Enum.AnimationPriority.Action
        activeTrack:Play()
    end
end

end)

fleet kettle
#

and remove the animation thing?

#

by here?

humble plinth
#

Yeah you dont need it

fleet kettle
#

the same thing..

humble plinth
#

In studio? Try it on roblox

#

Is it the same output

fleet kettle
#

do you mean to make this server public?

humble plinth
#

Oh nvm im dumb

fleet kettle
#

i test right now wait

#

same thing

humble plinth
#

Use a VehicleSeat instead of seat

#

Then test it

fleet kettle
#
local vehicleSeat = script.Parent
local activeTrack = nil

local sleepAnim = Instance.new("Animation")
sleepAnim.AnimationId = "rbxassetid://72129294159810"

vehicleSeat:GetPropertyChangedSignal("Occupant"):Connect(function()
    local sitter = vehicleSeat.Occupant

    -- Stop any currently playing animation
    if activeTrack then
        activeTrack:Stop()
        activeTrack = nil
    end

    if sitter then
        local humanoid = sitter.Parent:FindFirstChildOfClass("Humanoid")
        if humanoid then
            local animator = humanoid:FindFirstChildOfClass("Animator")
            if not animator then
                animator = Instance.new("Animator")
                animator.Parent = humanoid
            end

            -- Load and play the animation
            activeTrack = animator:LoadAnimation(sleepAnim)
            activeTrack.Priority = Enum.AnimationPriority.Action
            activeTrack:Play()
        end
    end
end)
#

is good?

humble plinth
#

No bro

#

Like press the plus button on the couch model

fleet kettle
#

and then i add script

#

in vehicleseat?

humble plinth
#

Yes

#

Yes

#

Switch them

fleet kettle
#

ok

humble plinth
#

Put the script inside it

fleet kettle
humble plinth
#

Bro remove the seat

#

Its still not working?

fleet kettle
#

wait

#

same

#

i remove the seat too

humble plinth
#

Make it transparent

fleet kettle
#

i maked yesterday like this man

#

and the legs was in left in right

humble plinth
#

Yeah, I think you just need to use a ProximityPrompt instead of having a part you sit in.

#

The seat has preset animations for it so it disrupts the script

fleet kettle
#

what can i do?

humble plinth
#

Remove the seat or vehicle seat

fleet kettle
#

i removed both

humble plinth
#

Switch it for a proximity prompt.

fleet kettle
#

wdym proximity prompt.

humble plinth
#

No not in tool box

fleet kettle
#

plugins?

humble plinth
#

Close tool box bro

fleet kettle
#

ok

humble plinth
#

No in explore tab

#

Where your workspace is

#

In the model

fleet kettle
#
local proximityPrompt = script.Parent
local seat = proximityPrompt.Parent.Seat

seat:GetPropertyChangedSignal("Occupant"):Connect(function()
    if seat.Occupant then
        proximityPrompt.Enabled = false
    else
        proximityPrompt.Enabled = true
    end
end)

proximityPrompt.Triggered:Connect(function(player)
    seat:Sit(player.Character.Humanoid)
end)```
#

aaa

#

ok

#

i found

#

and now?

humble plinth
#

ok good

fleet kettle
#

and now when i go around the couch

#

is a text with press to e

#

no?

humble plinth
#

Change the proximitypromts properties

humble plinth
#

Did u not want it with e?

#

Like that

#

But with an animation

fleet kettle
#

is okay bro

mild lakeBOT
#

studio** You are now Level 3! **studio

fleet kettle
#

i just want to working this thing

humble plinth
#

Ok lets try it then

fleet kettle
#

or i let default?

humble plinth
#

Set to like lay down

#

Thats what its going to say

fleet kettle
#

ok

#

by here?

humble plinth
#

I’m k its good

fleet kettle
#

nothing happend

#

....

humble plinth
#

The e is not showing up?

fleet kettle
#

no

#

i did something wrong

#

probably

humble plinth
#

Lets see the parent

#

Let me see the model

fleet kettle
humble plinth
#

Ungroup

fleet kettle
#

proximityprompt?

humble plinth
#

The whole model for now

fleet kettle
#

ok

#

and now?

humble plinth
#

Sorry my phone died

#

Nvm group it

#

Just make a new part

#

And name it LayHitbox

fleet kettle
#

...

#

bro i make a new part in this group moddel

#

or a new?

humble plinth
#

Just a new part in general

#

Not in a group

fleet kettle
#

ok and now?

humble plinth
#

Not in a rig

#

Parents should be workspace

fleet kettle
#

is not

#

in rig

humble plinth
#

Ok good mb

#

Set cancollide to false

fleet kettle
#

ok

humble plinth
#

Put a script inside

#

The part

#

Copy this code into it

#

local hitbox = script.Parent

local layAnim = Instance.new("Animation")
layAnim.AnimationId = "rbxassetid://72129294159810"

hitbox.Touched:Connect(function(hit)
local character = hit.Parent
if not character then return end

local player = game.Players:GetPlayerFromCharacter(character)
if not player then return end

local humanoid = character:FindFirstChildOfClass("Humanoid")
if not humanoid then return end

local animator = humanoid:FindFirstChildOfClass("Animator")
if not animator then
    animator = Instance.new("Animator")
    animator.Parent = humanoid
end

local animTrack = animator:LoadAnimation(layAnim)
animTrack.Priority = Enum.AnimationPriority.Action
animTrack:Play()

end)

fleet kettle
#

ok

#

and then test?

humble plinth
#

Is it inside correctly

fleet kettle
humble plinth
#

Ok good

fleet kettle
humble plinth
#

Now test lets see

fleet kettle
#

where is?

humble plinth
#

Anchor it

fleet kettle
mild lakeBOT
#

studio** You are now Level 4! **studio

humble plinth
#

Nice

fleet kettle
#

but is moving

#

how can i stop the moving?

humble plinth
#

You are cant jump up?

fleet kettle
#

i mean i can jump

#

the animation is still going

humble plinth
#

Switch script

#

local hitbox = script.Parent

local layAnim = Instance.new("Animation")
layAnim.AnimationId = "rbxassetid://72129294159810"

local cooldownTime = 3 -- seconds
local cooldownPlayers = {}

hitbox.Touched:Connect(function(hit)
local character = hit.Parent
if not character then return end

local player = game.Players:GetPlayerFromCharacter(character)
if not player then return end

-- Check cooldown
if cooldownPlayers[player] then return end

local humanoid = character:FindFirstChildOfClass("Humanoid")
if not humanoid then return end

local animator = humanoid:FindFirstChildOfClass("Animator")
if not animator then
    animator = Instance.new("Animator")
    animator.Parent = humanoid
end

local animTrack = animator:LoadAnimation(layAnim)
animTrack.Priority = Enum.AnimationPriority.Action
animTrack:Play()

-- Add to cooldown
cooldownPlayers[player] = true
task.delay(cooldownTime, function()
    cooldownPlayers[player] = nil
end)

-- Stop animation when jumping
humanoid:GetPropertyChangedSignal("Jump"):Connect(function()
    if humanoid.Jump and animTrack.IsPlaying then
        animTrack:Stop()
    end
end)

end)

fleet kettle
#

is working with jump

#

but the animation is moving alone

#

...

humble plinth
#

Switch

#

local hitbox = script.Parent

local layAnim = Instance.new("Animation")
layAnim.AnimationId = "rbxassetid://72129294159810"

local cooldownTime = 3 -- seconds
local cooldownPlayers = {}

hitbox.Touched:Connect(function(hit)
local character = hit.Parent
if not character then return end

local player = game.Players:GetPlayerFromCharacter(character)
if not player then return end

-- Check cooldown
if cooldownPlayers[player] then return end

local humanoid = character:FindFirstChildOfClass("Humanoid")
local rootPart = character:FindFirstChild("HumanoidRootPart")
if not humanoid or not rootPart then return end

local animator = humanoid:FindFirstChildOfClass("Animator")
if not animator then
    animator = Instance.new("Animator")
    animator.Parent = humanoid
end

local animTrack = animator:LoadAnimation(layAnim)
animTrack.Priority = Enum.AnimationPriority.Action
animTrack:Play()

-- Anchor the player
rootPart.Anchored = true

-- Add to cooldown
cooldownPlayers[player] = true
task.delay(cooldownTime, function()
    cooldownPlayers[player] = nil
end)

-- Stop animation + unanchor when jumping
humanoid:GetPropertyChangedSignal("Jump"):Connect(function()
    if humanoid.Jump and animTrack.IsPlaying then
        animTrack:Stop()
        rootPart.Anchored = false
    end
end)

-- Also unanchor when animation ends naturally
animTrack.Stopped:Connect(function()
    rootPart.Anchored = false
end)

end)

fleet kettle
#

finish

#

and with this

#

can i make with standing pose too?

humble plinth
#

Lets see

#

You might be able to yeah

fleet kettle
#

i make fast animation standing pose?

humble plinth
#

It works for any animation

#

Just change the animation id

#

But remember it anchored your player

#

Can i see a video ?

fleet kettle
#

?

#

wdym

#

is working

#

yaaaaaaaaaaaaaaaaay

#

but one thing

humble plinth
#

🙂

fleet kettle
#

how can i stop the dfault animation

#

i mean he is moving aroundd he look behind

#

then left and right

#

and i want to stop the animation

humble plinth
#

Dont save your animations under core

#

It has to be an action

fleet kettle
#

it is

#

action

#

how can i stop this animation?

#

because i want just my animation from editor

low musk
humble plinth
#

Switch the code to this

#

local hitbox = script.Parent

local layAnim = Instance.new("Animation")
layAnim.AnimationId = "rbxassetid://72129294159810"

local cooldownTime = 3 -- seconds
local cooldownPlayers = {}

hitbox.Touched:Connect(function(hit)
local character = hit.Parent
if not character then return end

local player = game.Players:GetPlayerFromCharacter(character)
if not player then return end

if cooldownPlayers[player] then return end

local humanoid = character:FindFirstChildOfClass("Humanoid")
local rootPart = character:FindFirstChild("HumanoidRootPart")
if not humanoid or not rootPart then return end

local animator = humanoid:FindFirstChildOfClass("Animator")
if not animator then
    animator = Instance.new("Animator")
    animator.Parent = humanoid
end

-- Stop all other animations before playing
for _, track in ipairs(animator:GetPlayingAnimationTracks()) do
    track:Stop()
end

local animTrack = animator:LoadAnimation(layAnim)
animTrack.Priority = Enum.AnimationPriority.Action -- Make sure it's high
animTrack:Play()

-- Anchor the player
rootPart.Anchored = true

-- Add to cooldown
cooldownPlayers[player] = true
task.delay(cooldownTime, function()
    cooldownPlayers[player] = nil
end)

-- Stop lay animation and unanchor when jumping
humanoid:GetPropertyChangedSignal("Jump"):Connect(function()
    if humanoid.Jump and animTrack.IsPlaying then
        animTrack:Stop()
        rootPart.Anchored = false
    end
end)

-- Also unanchor when animation ends
animTrack.Stopped:Connect(function()
    rootPart.Anchored = false
end)

end)

low musk
#

If you played it

humble plinth
#

@fleet kettle you did it?

fleet kettle
#

is not working

#

anymore

humble plinth
#

All animations stoped?

fleet kettle
#

yes

humble plinth
#

Check output for me

fleet kettle
humble plinth
#

Or try this code

#

local hitbox = script.Parent

local layAnim = Instance.new("Animation")
layAnim.AnimationId = "rbxassetid://72129294159810"

local cooldownTime = 3 -- seconds
local cooldownPlayers = {}

hitbox.Touched:Connect(function(hit)
local character = hit.Parent
if not character then return end

local player = game.Players:GetPlayerFromCharacter(character)
if not player then return end

if cooldownPlayers[player] then return end

local humanoid = character:FindFirstChildOfClass("Humanoid")
local rootPart = character:FindFirstChild("HumanoidRootPart")
if not humanoid or not rootPart then return end

local animator = humanoid:FindFirstChildOfClass("Animator")
if not animator then
    animator = Instance.new("Animator")
    animator.Parent = humanoid
end

-- Stop all other animations before playing
for _, track in ipairs(animator:GetPlayingAnimationTracks()) do
    track:Stop()
end

local animTrack = animator:LoadAnimation(layAnim)
animTrack.Priority = Enum.AnimationPriority.Action
animTrack:Play()

-- Anchor the player
rootPart.Anchored = true

-- Add to cooldown
cooldownPlayers[player] = true
task.delay(cooldownTime, function()
    cooldownPlayers[player] = nil
end)

-- Stop lay animation and unanchor when jumping
humanoid:GetPropertyChangedSignal("Jump"):Connect(function()
    if humanoid.Jump and animTrack.IsPlaying then
        animTrack:Stop()
        rootPart.Anchored = false
    end
end)

-- Also unanchor when animation ends
animTrack.Stopped:Connect(function()
    rootPart.Anchored = false
end)

end)

fleet kettle
#

brooo

#

i am soo

#

...

#

look here

#

first line

#

and now?

humble plinth
#

Lol

primal owl
#

220 messages in an hour ?

humble plinth
#

Dont add switch the code to this

fleet kettle
#

i removed

humble plinth
#

You cant have any errors not even a .

fleet kettle
humble plinth
#

?

#

Is it working

fleet kettle
#

idk what happend

#

is broken the script

#

...

humble plinth
#

Lol

fleet kettle
#

i put the alt script

#

what i said is working

#
local hitbox = script.Parent

local layAnim = Instance.new("Animation")
layAnim.AnimationId = "rbxassetid://72129294159810"

local cooldownTime = 3 -- seconds
local cooldownPlayers = {}

hitbox.Touched:Connect(function(hit)
    local character = hit.Parent
    if not character then return end

    local player = game.Players:GetPlayerFromCharacter(character)
    if not player then return end

    -- Check cooldown
    if cooldownPlayers[player] then return end

    local humanoid = character:FindFirstChildOfClass("Humanoid")
    local rootPart = character:FindFirstChild("HumanoidRootPart")
    if not humanoid or not rootPart then return end

    local animator = humanoid:FindFirstChildOfClass("Animator")
    if not animator then
        animator = Instance.new("Animator")
        animator.Parent = humanoid
    end

    local animTrack = animator:LoadAnimation(layAnim)
    animTrack.Priority = Enum.AnimationPriority.Action
    animTrack:Play()

    -- Anchor the player
    rootPart.Anchored = true

    -- Add to cooldown
    cooldownPlayers[player] = true
    task.delay(cooldownTime, function()
        cooldownPlayers[player] = nil
    end)

    -- Stop animation + unanchor when jumping
    humanoid:GetPropertyChangedSignal("Jump"):Connect(function()
        if humanoid.Jump and animTrack.IsPlaying then
            animTrack:Stop()
            rootPart.Anchored = false
        end
    end)

    -- Also unanchor when animation ends naturally
    animTrack.Stopped:Connect(function()
        rootPart.Anchored = false
    end)
end)```
humble plinth
#

?

#

Is this one not working or it is

fleet kettle
#

idk what happend

#

because is broken

#

i make again

#

hitbox

#

wait

humble plinth
#

Change the part to invisible and place it on the couch

#

Then rotate it the the direction you want people laying

fleet kettle
#

.....

#

and is moving legss

#

....

humble plinth
#

Lol

fleet kettle
#

nothing to say i swear..

humble plinth
#

so even though you’re playing it, if certain joints (like the legs) aren’t fully controlled in the animation, Roblox fills in the blanks with default idle/joint motion.

fleet kettle
#

i fixed

#

little bit

#

is not moving anymore

#

i put the alt

humble plinth
#

?

fleet kettle
#
local hitbox = script.Parent

local layAnim = Instance.new("Animation")
layAnim.AnimationId = "rbxassetid://72129294159810"

local cooldownTime = 3 -- seconds
local cooldownPlayers = {}

hitbox.Touched:Connect(function(hit)
    local character = hit.Parent
    if not character then return end

    local player = game.Players:GetPlayerFromCharacter(character)
    if not player then return end

    -- Check cooldown
    if cooldownPlayers[player] then return end

    local humanoid = character:FindFirstChildOfClass("Humanoid")
    local rootPart = character:FindFirstChild("HumanoidRootPart")
    if not humanoid or not rootPart then return end

    local animator = humanoid:FindFirstChildOfClass("Animator")
    if not animator then
        animator = Instance.new("Animator")
        animator.Parent = humanoid
    end

    local animTrack = animator:LoadAnimation(layAnim)
    animTrack.Priority = Enum.AnimationPriority.Action
    animTrack:Play()

    -- Anchor the player
    rootPart.Anchored = true

    -- Add to cooldown
    cooldownPlayers[player] = true
    task.delay(cooldownTime, function()
        cooldownPlayers[player] = nil
    end)

    -- Stop animation + unanchor when jumping
    humanoid:GetPropertyChangedSignal("Jump"):Connect(function()
        if humanoid.Jump and animTrack.IsPlaying then
            animTrack:Stop()
            rootPart.Anchored = false
        end
    end)

    -- Also unanchor when animation ends naturally
    animTrack.Stopped:Connect(function()
        rootPart.Anchored = false
    end)
end)```
#

this what you give me

#

nevermind

humble plinth
#

Idk bro but you gotta make a new animation and make sure you save as action and make sure you make animations for every part of the body even if u not moving anything

#

I gotta go to bed

fleet kettle
#

local hitbox = script.Parent

local layAnim = Instance.new("Animation")
layAnim.AnimationId = "rbxassetid://72129294159810"

local cooldownTime = 3 -- seconds
local cooldownPlayers = {}

hitbox.Touched:Connect(function(hit)
    local character = hit.Parent
    if not character then return end

    local player = game.Players:GetPlayerFromCharacter(character)
    if not player then return end

    -- Check cooldown
    if cooldownPlayers[player] then return end

    local humanoid = character:FindFirstChildOfClass("Humanoid")
    if not humanoid then return end

    local animator = humanoid:FindFirstChildOfClass("Animator")
    if not animator then
        animator = Instance.new("Animator")
        animator.Parent = humanoid
    end

    local animTrack = animator:LoadAnimation(layAnim)
    animTrack.Priority = Enum.AnimationPriority.Action
    animTrack:Play()

    -- Add to cooldown
    cooldownPlayers[player] = true
    task.delay(cooldownTime, function()
        cooldownPlayers[player] = nil
    end)

    -- Stop animation when jumping
    humanoid:GetPropertyChangedSignal("Jump"):Connect(function()
        if humanoid.Jump and animTrack.IsPlaying then
            animTrack:Stop()
        end
    end)
end)```
#

i put this bro

#

i can move with this animations

#

...

#

good night brother

humble plinth
#

Ok goodnight you should just go to the one that was working lol

fleet kettle
#

i put the right

#

thing but i s not working anymore

humble plinth
#

Alright good night you almost got this done keep working on it

fleet kettle
#

same thing

fleet kettle
#

1

#

@low musk

#

i fixed but how can i stop the animation from default

#

i want just tihs animtion what i put

low musk
#

Since I’m wasn’t really from the start and I’m lazy to read everything i don’t understand what do you mean by this

#

Like change default sit anim?

fleet kettle
#

i want animation

#

just what i did

#

not to move legs alone

fleet kettle
#

i mean i fixed

#

....

#

i maked with laying prop..

cosmic galleon