I want to make a game where you play as a person who sits on a computer, but I’m having trouble finding out how to make the seat find out whos sitting on it, and to play an animation when they do.
I know for a fact the animation part of the script works, because I tested it. I just don’t know how to trigger the animation when the character sits down.
![image](https://doy2mn9upadnk.cloudfront.net/images/transparent.png)
If someone knows the answer to my issue, it’d be a lot of help and I’d like to give thanks in advance.
Edit: the animation is inside the character, and the server script is in the seat part
2 Likes
You could try detecting if the Seat | Roblox Creator Documentation property changed like this:
script.Parent:GetPropertyChangedSignal("Occupant"):Connect(function()
-- your code for animating the character
end)
However, the API documentation stated that the property wasn’t replicated across the server/client boundary. In other words, you can try it, but if it doesn’t work than you may need to use a local script instead.
2 Likes
There’s a property in the Humanoid called something like Sit so if that’s true then just play anim (NOTE: I don’t know if sit is the exact name but if it is use this)
humanoid:GetPropertyChangedSignal("Sit"):Connect(function()
end)
1 Like
Wow! That was really quick of a fix! Thanks, you helped me out a bunch.
![image](//devforum-uploads.s3.dualstack.us-east-2.amazonaws.com/uploads/original/4X/e/5/0/e5045138e504a1a2ca923e0c1c48e19c7c575ce6.jpeg)
God bless you!
1 Like
I’ll give it a go, might be worth some looking into
1 Like