I’m making a move system that uses a lot of parameters. In the server it adds another parameter which would be my character and then fires it to the client. On the client, at first the fourth parameter is actually equal to my character; however, two lines down my parameters are instead set to be nil.
Server ^
Client ^
In the video the first warn is my characters name which is correct however after it only warns nil
There might be a problem as you translate a tuple to a list and back. I think nil and void value might also be getting mixed up and causing problems.
I’d recommend handing a single parameter, called “data” and probably use it as a dictionary for all the data that each function may want to use.
Your warning is coming from 2 different scripts 1 is called “stomp” the other is “stompEFX”.
The problem is in your “stomp” script.
I’m aware that the error happens in the StompEFX module because it is trying to play the effect on a parameter that is nil. My issue is why its being set to nil as it does so even in the local script before it
Can you give a snippet of your “stomp” script.
Can you please send the code that is calling :FireServer?
I want to double check that you aren’t providing the player argument in it (if so, remove the player argument)
Basically it checks when a certain part of the animation reaches and then gives the server the name of the part of the animation that it reached so that it can play different effects, sounds and do damage on different part
it is pretty messy though
local module = {}
local Tween = game.TweenService
local RS = game.ReplicatedStorage
--// Assets
local Assets = RS.Assets
local Remotes = Assets.Remotes
local Skills = Assets.Skills
local Modules = Assets.Modules
local FX = Remotes.FX
local Effects = Assets.Effects
local StompEffects = Effects[script.Name]
local Debris = game.Debris
function module.Effects(...)
local Params = {...}
warn(Params[4])
local HMNRP = Params[4]["HumanoidRootPart"]
if Params[1] == "Glow" then
for i,v in pairs(Params[4]:GetChildren()) do
local TInfo = TweenInfo.new(.65, Enum.EasingStyle.Quad,Enum.EasingDirection.Out, 0,true,0)
local Goal = {}
Goal.FillTransparency =.7
local Glow = Instance.new("Highlight")
local TweenCreate = Tween:Create(Glow,TInfo,Goal)
Glow.Parent = v
Glow.DepthMode = "Occluded"
Glow.OutlineTransparency = 1
TweenCreate:Play()
Debris:AddItem(Glow,.65)
end
end
if Params[1] == "Speed" then
local Speed = StompEffects.SpeedPart:Clone()
local Offset = Vector3.new(.75,-4,-1)
local GoalCF = HMNRP.CFrame:PointToWorldSpace(Offset)
Speed.Parent = HMNRP
Speed.Position = GoalCF
Debris:AddItem(Speed,.175)
end
if Params[1] == "Damage" then
local Ground = StompEffects.Ground:Clone()
local Rocks = StompEffects.Rocks:Clone()
local Wind = StompEffects.Wind:Clone()
local Offset = Vector3.new(.75,-3,-1)
local GoalCF = HMNRP.CFrame:PointToWorldSpace(Offset)
Ground.Parent = HMNRP
Ground.Position = GoalCF
Rocks.Parent = HMNRP
Rocks.Position = GoalCF
Wind.Parent = HMNRP
Wind.Position = GoalCF
local RockParticles = Rocks.RockEffects
RockParticles:Emit(57)
local GroundParticles = Ground.Attachment.GroundEffects
GroundParticles:Emit(300)
local WindAttachment = Wind.Attachment
for i,v in pairs(WindAttachment:GetChildren()) do
v:Emit(150)
end
end
end
return module ```
This is just the place where i play the effects
The problem is you are doing Params[4]
Your character is now Params[2]
1 Like
Oh my gosh i cant believe i forgot somthing so simple tysm!
1 Like