I want to simplify the progress of adding If’s for each variables so it won’t take much time to use it.
game.ReplicatedStorage.ShakeCamera.OnClientEvent:Connect(function(magnitude,roughness,fadeintime,fadeouttime,posinflu,rotinflu)
local shake = camShake:ShakeOnce(magnitude,roughness,fadeintime,fadeouttime,posinflu,rotinflu)
end)
as you can see there’s a lot of variables in there.
i tried something like this :
m = magnitude or 1
but rather than getting the results i want, the variable just went crazy and chaotic.
for example the magnitude value becomes PosInflu value.
i also need this kind of method for complex AI that has lots of condition.