How do I add particle effects to the player once a button is pressed (Gui button)
Drawing of what i mean
How do I add particle effects to the player once a button is pressed (Gui button)
Drawing of what i mean
MouseButton1Click > Enable / clone particle to their character (ex, head).
If you want this change to replicate to all players, use a RemoteEvent > FireServer.
Sorry if this is extremely wrong I am very new
script.Parent.MouseButton1Click:Connect(function()
Instance.new("ParticleEmmiter, player.Character.Head")
end)
So do something like this?
You’ll need to get the player instance, then the character.
What you’re currently doing is creating ParticleEmmiter, player.Character.Head
, which doesn’t exist.
Here’s an example:
local Player = game:GetService('Players').LocalPlayer
Button.MouseButton1Click:Connect(function()
local Character = Player.Character
if not Character then return end
local Head = Character:FindFirstChild('Head')
if not Head then return end
Instance.new('ParticleEmitter', Head)
end)
script.Parent.MouseButton1Click:Connect(function()
Instance.new("ParticleEmmiter", game.Players.LocalPlayer.Character.Head)
end)
mine will work but the particle can only be seen by the player who clicked as its created locally
Button = script.Parent
Button.MouseButton1Click:Connect(function()
local Player = script.Parent.Parent.Parent.Parent.Parent
local Character = Player.Character
local particles = Instance.new('ParticleEmitter')
particles.Parent = Character.Head
end)
this works, plus its serversided so everyone can see
Video: Example
Thanks! I just got it working