I got a tool that when activated plays an animation and enables a particle effect. Players can only see the particles from their tool, when I want them to see the particles from everyone else’s and their own. Is there a workaround to make the particle emitter work how I want it to?
2 Likes
Can’t you just change the script to a ServerScript
? Unless if there are specific client-only variables you have in your script, then maybe you could use RemoteEvents
for that
You can try using a normal script and tell it to activate the Particle Emitter.
That way everyone will see it.
-- Example
tool:Eqquiped:Connect(function()
script.Parent.ParticleEmitter.Enabled = true
end)
--Optional
tool:Uneqquiped:Connect(function()
script.Parent.ParticleEmitter.Enabled = false
end)
1 Like
I had a
game:GetService(“Players”).LocalPlayer
which I used when playing the animation. Is there an alternative to this that works with regular scripts?
You can get the Player's Character
instead by doing this:
local Tool = script.Parent
local AnimToLoad = --Parent to where you want your animation to load
Tool.Activated:Connect(function()
local Character = Tool.Parent
local Animator = Character:WaitForChild("Humanoid", 3):WaitForChild("Animator", 3)
local LoadAnim = Animator:LoadAnimation(AnimToLoad)
LoadAnim:Play()
end)
Character
would be referred as to the Tool’s Parent, since upon equipped the Tool is parented to the Player’s Character
script > Tool > Character (Or script.Parent.Parent)
1 Like