local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TweenService = game:GetService("TweenService")
local FireworkFireRemote = ReplicatedStorage:WaitForChild('Fire')
local Debris = game:GetService("Debris")
FireworkFireRemote.OnClientEvent:Connect(function(player, Start, Middle, Finish, FireworkLength, FireworkClone, ColorPoints, ExplosionDetail, OrbSizePoints)
Debris:AddItem(Middle, 35)
local function lerp(Part0, Part1, Time)
return Part0 * (1-Time) + Part1 * Time
end
local function quad(p0,p1,p2,t)
local l1 = lerp(p0, p1, t)
local l2 = lerp(p1, p2, t)
local quad = lerp(l1,l2, t)
return quad
end
local function CreatePath()
for i = 1, FireworkLength do
local t = i/65
local updated = quad(Start.Position, Middle.Position, Finish.Position, t)
FireworkClone.Position = updated
wait(.01)
if i == FireworkLength then
local Effects = FireworkClone.Attachment:WaitForChild("SparksRelease")
local Launch = FireworkClone.Attachment:WaitForChild("Launch")
Launch:Play()
wait(.05)
Effects.Color = ColorSequence.new(ColorPoints)
local Sound1 = FireworkClone.Attachment:WaitForChild("Firework")
Sound1:Play()
Debris:AddItem(FireworkClone, 20)
Effects:Emit(ExplosionDetail)
end
end
end
CreatePath()
end)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TweenService = game:GetService("TweenService")
local FireworkFireRemote = ReplicatedStorage:WaitForChild('Fire')
local Debris = game:GetService("Debris")
FireworkFireRemote.OnClientEvent:Connect(function(player, Start, Middle, Finish, FireworkLength, FireworkClone, ColorPoints, ExplosionDetail, OrbSizePoints)
Debris:AddItem(Middle, 35)
local function lerp(Part0, Part1, Time)
return Part0 * (1-Time) + Part1 * Time
end
local function quad(p0,p1,p2,t)
local l1 = lerp(p0, p1, t)
local l2 = lerp(p1, p2, t)
local quad = lerp(l1,l2, t)
return quad
end
local function CreatePath()
for i = 1, 10, FireworkLength do
local t = i/65
local updated = quad(Start.Position, Middle.Position, Finish.Position, t)
FireworkClone.Position = updated
wait(.01)
if i == FireworkLength then
local Effects = FireworkClone.Attachment:WaitForChild("SparksRelease")
local Launch = FireworkClone.Attachment:WaitForChild("Launch")
Launch:Play()
wait(.05)
Effects.Color = ColorSequence.new(ColorPoints)
local Sound1 = FireworkClone.Attachment:WaitForChild("Firework")
Sound1:Play()
Debris:AddItem(FireworkClone, 20)
Effects:Emit(ExplosionDetail)
end
end
end
CreatePath()
end)
Can you show the server script firing the remoteevent? Also, when you fire a remoteevent from the server you write the player you want to fire to with all the other arguments aswell, but this doesnât mean that the player will be sent over as an argument as youâve done here:
As suspected, one of the problems is the fact u take player as an argument, which messes up what variable stores what information. Just use this instead:
You used WaitForChild for the variables which literally canât be nil. It confuses me why they are though. Like this line, IT CANT BE NIL BUT IT IS: fireworks.Parent:WaitForChild(âFireworkâ).
Are there any more outputs like âInfinite possible yieldâ or something in the console?
Wait, you turned off Archivable? Also if the original variable fireworks.Parent:WaitForChild("Firework") is nil, then Archivable canât be the issue, right?
Wait oops. Sorry read it wrongly. Yep, the error attempt to index with âpositionâ its still here. This is confusing, I am not sure what have gone wrong.