I’ve seen some posts about this, but non seem to apply to me. I have a animation that happens when you activate a part. I own the animation AND the game. The script changes from 3 animations at random. Yet if I try to go on two devices, it will only appear to work on one of them. Does anyone know why?
(The script is in the handle of the part and is not local)
——————————————————————
I don’t have the script itself with me right now, but it would be your basic script for animating a player
local Stick = script.Parent
local players = game:GetService("Players")
local StickSwing1 = Stick.Parent:FindFirstChild("Stick Swing 1")
local StickSwing2 = Stick.Parent:FindFirstChild("Stick Swing 2")
local StickSwing3 = Stick.Parent:FindFirstChild("Stick Swing 3")
local Swing = 0
local SwingSpeed = 1
local Swinging = false
local RM = script.Parent:FindFirstChild("RemoteEvent")
local function StickSwing()
if Swinging then return end
Swinging = true
Swing = Swing + 1
local Char = Stick.Parent.Parent
local player = players:GetPlayerFromCharacter(Char)
local humanoid = player.Character:FindFirstChild("Humanoid")
if humanoid then
if Swing == 1 then
local animationPlay = humanoid:LoadAnimation(StickSwing1)
animationPlay.Priority= Enum.AnimationPriority.Action
animationPlay:Play()
wait(SwingSpeed)
Swinging = false
elseif Swing == 2 then
local animationPlay = humanoid:LoadAnimation(StickSwing2)
animationPlay.Priority= Enum.AnimationPriority.Action
animationPlay:Play()
wait(SwingSpeed)
Swinging = false
elseif Swing == 3 then
local animationPlay = humanoid:LoadAnimation(StickSwing3)
animationPlay.Priority= Enum.AnimationPriority.Action
animationPlay:Play()
wait(SwingSpeed)
Swinging = false
Swing = 0
end
end
end
Stick.Parent.Activated:Connect(function()
StickSwing()
end)
Stick.Parent.Unequipped:Connect(function()
Swing = 0
end)