#help vfx not activating

1 messages · Page 1 of 1 (latest)

edgy fossil
#

local stompVFX = game.ReplicatedStorage.VFX.StompVFX:Clone()
local hrp = plr.Character:FindFirstChild("HumanoidRootPart")
local rootAttachment = hrp:FindFirstChild("RootAttachment")
stompVFX.CFrame = rootAttachment.WorldCFrame
stompVFX.Anchored = true
stompVFX.Parent = workspace.VFXclone

        print("Server sees:", workspace:FindFirstChild("VFXclone"))

        local pathToEmit = stompVFX
        for _,Particles in pairs(pathToEmit:GetDescendants()) do
            if Particles:IsA("ParticleEmitter") then
                Particles:Emit(Particles:GetAttribute("EmitCount"))
            end
        end

yo it prints and it spawns the part on the right location, why is it not emmiting the particles???

#

it is on a serverscript

spring flower
#

Use server script ( script in like serverscriptserver )

local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

-- Create RemoteEvent if it doesn't exist
local stompEvent = Instance.new("RemoteEvent")
stompEvent.Name = "StompVFXEvent"
stompEvent.Parent = ReplicatedStorage

-- Your existing stomp logic
local function onStomp(plr)
local hrp = plr.Character:FindFirstChild("HumanoidRootPart")
if not hrp then return end

local rootAttachment = hrp:FindFirstChild("RootAttachment")
if not rootAttachment then return end

-- Fire to ALL clients (including the player who stomped)
stompEvent:FireAllClients(rootAttachment.WorldCFrame)

end

-- Connect this to your stomp ability logic
-- Example: game.Players.PlayerAdded:Connect(...) + ability trigger

upper breach
spring flower
edgy fossil
#

Yeah im gonna try this and hope it works!

spring flower
edgy fossil
#

serverscript:

game.ReplicatedStorage.TriggerStomp:FireAllClients(stompVFX)

#

lcoal script:

game.ReplicatedStorage.TriggerStomp.OnClientEvent:Connect(function(stompVFX)
if not stompVFX or not stompVFX.Parent then
-- wacht tot het wel beschikbaar is
stompVFX = workspace.VFXclone:WaitForChild("StompVFX")
end
for _,Particles in pairs(stompVFX:GetDescendants()) do
if Particles:IsA("ParticleEmitter") then
Particles:Emit(Particles:GetAttribute("EmitCount"))
end
end
end)

spring flower
edgy fossil
#

but thanks for the help tho

#

what you need it for?

spring flower
spring flower
edgy fossil
spring flower