I was making the sit animation system , It’s look like It is working in studio But It’s not working in the real game.
I have no Idea where I should fix the animation or the script?
STUDIO:
ROBLOX:
SCRIPT:
Module script
function module:Sit(Player,Seat)
local ProximityPromt = Seat.ProximityPrompt
local human = Player.Character:FindFirstChild("Humanoid")
local anim = human:LoadAnimation(Seat.Animation)
Seat:GetPropertyChangedSignal("Occupant"):Connect(function()
if Seat.Occupant then
ProximityPromt.Enabled = false
if human ~= nil then
anim:Play()
human = nil
end
else
ProximityPromt.Enabled = true
human = nil
if anim ~= nil then
anim:Stop()
anim:Remove()
end
end
end)
Seat:Sit(Player.Character.Humanoid)
end
Script
local Module = require(game.ServerScriptService.ServerMainScriptService)
local Player = game:GetService("Players")
script.Parent.Triggered:Connect(function(Player)
Module:Sit(Player,script.Parent.Parent)
end)
POSITION:
