#Helping with laying pose animation and standing pose too
1 messages · Page 1 of 1 (latest)
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
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)
same thing
Try this code i changed the animation from core to action in the code so u dont have to re upload
U changed it?
yes
Show output
No like the output go to view
And press output
Then play the game i want to see what it prints
Whats the animation id
rbxassetid://72129294159810
** You are now Level 2! **
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)
Yeah you dont need it
do you mean to make this server public?
Oh nvm im dumb
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?
ok
Put the script inside it
wait
same
i remove the seat too
⭐️(like + sub = thanks)
►Script: https://pastebin.com/T0462a6a
►Hire me here: https://www.fiverr.com/share/4Q0a2G
►My second channel: @coolcapi
►Discord Server: https://discord.gg/8E79dVvpe6
Music: K-391 - Earth
Timecodes
0:00 - Intro
0:15 - Instructions
3:10 - Testing
Make it transparent
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
what can i do?
Remove the seat or vehicle seat
i removed both
Switch it for a proximity prompt.
No not in tool box
plugins?
Close tool box bro
ok
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?
ok good
Change the proximitypromts properties
Yeah
Did u not want it with e?
Like that
But with an animation
is okay bro
** You are now Level 3! **
i just want to working this thing
Ok lets try it then
I’m k its good
The e is not showing up?
Ungroup
proximityprompt?
The whole model for now
ok
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)
Is it inside correctly
Ok good
Now test lets see
where is?
Anchor it
** You are now Level 4! **
Nice
You are cant jump up?
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)
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)
i make fast animation standing pose?
It works for any animation
Just change the animation id
But remember it anchored your player
Can i see a video ?
🙂
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
it is
action
how can i stop this animation?
because i want just my animation from editor
Animation:Stop()
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)
If you played it
@fleet kettle you did it?
All animations stoped?
yes
Check output for me
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)
Lol
220 messages in an hour ?
Dont add switch the code to this
i removed
You cant have any errors not even a .
this is now
Lol
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)```
Change the part to invisible and place it on the couch
Then rotate it the the direction you want people laying
Lol
nothing to say i swear..
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.
?
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
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
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
Ok goodnight you should just go to the one that was working lol
Alright good night you almost got this done keep working on it
1
@low musk
i fixed but how can i stop the animation from default
i want just tihs animtion what i put
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?
