How to make animation play for one player

So i have this npc intro thing, but i want it to play an animation just for one player, but it doesnt even work? any help?

local function playintrogun()
	if dog == false then
		dog = true
	NPC.Glock19.Flash.Flash.Enabled = false
	NPC.Glock19.Flash.Muzzle.Enabled = false
	NPC.Glock19.Flash.Smoke.Enabled = false
	NPC.Glock19.Flash.Sparks.Enabled = false

	NPC.Glock19.Attachment.Springtoob.Transparency = 1
	NPC.Glock19.Attachment.grip.Transparency = 1
	NPC.Glock19.Bolt.Transparency = 1
	NPC.Glock19.toob.Transparency = 1

	local hum = NPC.Humanoid
	local anim_feet = hum:LoadAnimation(script.Parent.Animation)
	local current = anim_feet
	current:Play()

	wait(1)
	NPC.Glock19.Attachment.Springtoob.Transparency = 0
	NPC.Glock19.Attachment.grip.Transparency = 0
	NPC.Glock19.Bolt.Transparency = 0
	NPC.Glock19.toob.Transparency = 0

	wait(2)
	NPC.Glock19.Handle.FireSound:Play()

	NPC.Glock19.Flash.Flash.Enabled = true
	NPC.Glock19.Flash.Muzzle.Enabled = true
	NPC.Glock19.Flash.Smoke.Enabled = true
	NPC.Glock19.Flash.Sparks.Enabled = true
	wait(0.1)
	NPC.Glock19.Flash.Flash.Enabled = false
	NPC.Glock19.Flash.Muzzle.Enabled = false
	NPC.Glock19.Flash.Smoke.Enabled = false
	NPC.Glock19.Flash.Sparks.Enabled = false
	end
	end
1 Like

Can’t you just change it into a LocalScript? Unless if it’s parented to the workspace, then you’d need to use RemoteEvents for that

2 Likes