I have a particle emitter inside a part, the firework sends a bindeable event and inside a different script it clones it and is supposed to set the position but it’s not working, it’s always 0,0,0.
Script that receives the bindeable
bindeables.CreateExplosion.Event:Connect(function(amount, fireworkType, fireworkPosition)
print("fired")
if fireworkType == "RedFirework" then
print("yes")
local explosion = game:GetService("ServerStorage").FireworkExplosion:Clone()
explosion.Position = Vector3.new(fireworkPosition)
explosion.Parent = game.Workspace
print(fireworkPosition)
print(fireworkPosition)
task.wait()
explosion.ParticleEmitter:Emit(amount)
end
end)
the script that sends the bindeable
local firework = script.Parent
local height = 100
local playerName = firework:GetAttribute("Player")
local player = game.Players:WaitForChild(playerName)
local speed = player.playerstats.FireworkSpeed.Value
local sound = firework.Sound
local remotes = game:GetService("ReplicatedStorage").Remotes
sound:Play()
for i = 0, height/speed do
firework:PivotTo(firework:GetPivot() + Vector3.new(0,speed,0))
wait(0.01)
end
game.ReplicatedStorage.Bindeables.CreateExplosion:Fire(100, "RedFirework", firework.Body.Position)
remotes.CashEffect:FireClient(player, player, height)
firework:Destroy()
Also I know it’s not because of the transmission from the bindeables because I print it and it comes out with the position, but when I print the position it comes out with 0,0,0. Both scripts are regular scripts