so i found a script here for sitting animations and it worked exsept for one thing... it doesent randomis it picks one of the 10 animations and thats the only one the server gets. how do i fix this?
script
local sitAnims = {5796017838, 5795997473, 5797358565, 5797367074, 5797454322, 5797437258, 5797418299, 5797400225, 5797394915, 5795997473,} --Paste the same one in twice, unless you want random ones
local seat = script.Parent --Link this to the seat local playingAnim
local newAnim = Instance.new('Animation') newAnim.AnimationId = 'rbxassetid://'..sitAnims[math.random(#sitAnims)]
seat.Changed:Connect(function(property) if property == 'Occupant' then local occupant = seat.Occupant if not occupant then if playingAnim then playingAnim:Stop() return end end playingAnim = occupant:LoadAnimation(newAnim) playingAnim:Play() end end)
(script by s_iara)
seat.Changed:Connect(function(p) if Seat.Occupant ~= nil then newAnim.AnimationId = 'rbxassetid://'..sitAnims[math.random(1,#sitAnims)] end end)
Edited as you like. Didn't tested, should work