where the hitbox is a part that the effect will cframe itself to.
however, in the module that handles this (client), nothing occurs when the module is called, indicating that the hitbox doesn’t exist according to the client, whilst it does on the server.
client vfx code:
function MeraEffects.Effect(Character: Model, HikenHitbox: BasePart)
local HumRP = Character:FindFirstChild("HumanoidRootPart")
if HikenHitbox then
local Hiken = script.Hiken:Clone()
Hiken.Parent = workspace.Visuals
Hiken.CFrame = HikenHitbox.CFrame
repeat task.wait()
Hiken.CFrame = HikenHitbox.CFrame
until HikenHitbox.Parent == nil
for _, effect in Hiken:GetDescendants() do
if effect:IsA("ParticleEmitter") or effect:IsA("Trail") then
effect.Enabled = false
end
end
Debris:AddItem(Hiken, 3)
end
end
upon printing the hitbox and its data on the client, it just returns nil.
Hmmm, could I see a bit more of the code that runs the VFX:FireAllClients()? The only problem I could really imagine to be causing this is that the hitbox part either never existed in the first place or it’s placed in a location that isn’t replicated e.g. ServerStorage (sorry for the late reply by the way)
Try adding a longer wait like 1 second for testing purposes, might be that the client takes longer to load the hitbox,
also you haven’t answered my question in one of my previous message, is workspace.StreamingEnabled enabled?
alright, it works now, but the delay would be pretty inconvenient even if i changed it since the game is pretty fast paced. StreamingEnabled is on by the way
Try turning streaming off and remove the wait and test and add task.wait() and test see if it works, if it does you might have to put the hitbox into a model and set Model.ModelStreamingMode to Persistent
Turn streaming on put the hitbox into a model and set Model.ModelStreamingMode to Persistent. Also don’t forget to change your code so its doing Model.Part.Anchored instead of Model.Anchored