Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

When I run a anim another player can't use the animation?

local Players = game:GetService("Players")
local rp = game.ReplicatedStorage
local summon = rp:WaitForChild("Summon")
local Ismoving = false
print("1")
summon.OnServerEvent:Connect(function(Player, isActive)
	print("2")
	local character = Player.Character
	local Stand = character:WaitForChild("Stand")
	local AnimControl = Stand:FindFirstChild("AnimControl")
	local humanoid = character:WaitForChild("Humanoid")
	print("4")
	local Idle = AnimControl:LoadAnimation(script.Parent.Idle)
	local MovingAnim = AnimControl:LoadAnimation(script.Parent.MovingAnim)
	local Stand = character:WaitForChild("Stand")
	

	humanoid:GetPropertyChangedSignal("MoveDirection"):Connect(function()
		if humanoid.MoveDirection.Magnitude > 0 then
			if Ismoving then
				return
			end

			Ismoving = true
			Idle:Stop()
			MovingAnim:Play()
		else
			Ismoving = false
			Idle:Play()
			MovingAnim:Stop()
		end
	end)
end)
print("Done")

When I start moving and the movingAnim plays and then another player starts moving they Can't/Don't have the movinganim instead they are just stuck with the idle animation

2 comments

0

movinganim = Moving Animation

0

and Its a server script

1 answer

First of all, Animation is FE. It can be run on the client, and the other clients and the server can see it. So you don't have to activate it on the server. Also as @Agent0fChaos0 said, there are a few things wrong with this script.

Edit: I didn't pay attention when the person who commented, that was actually the person that made the post, sorry ;-;

2 comments

0

oh I thought that for other people to see it it has to be a server script

0

Also, thanks for teaching me a new way to script running and jumping animation! :D

This discussion is preserved as it was. New answers, comments, and votes are closed.