General VFX
VFX functions that all classes use
Short description
General framework
Calling the module
local Lib = require(game.ReplicatedStorage.Modules.LibraryModule)
local Library = Lib()Visual effects
Library.CreateEffect
Library.CreateEffect(PartProperties, Goals, TweenInfo, BetFunc, EndFunc)
-- Example usage
Library.CreateEffect(
-- Part properties, this is the part being created
{
MeshId = Resources.Meshes.WindMesh.MeshId,
CFrame = cfo,
Color = Color3.new(1, 1, 1),
Scale = Vector3.new(radius1 / 2, 1, radius1 / 2),
Offset = Vector3.new(-radius1, 0.25, 0)
},
-- This is the final outcome of the part, the goal
{
Transparency = 1,
Scale = Vector3.new(radius2 / 2, 1, radius2 / 2),
Offset = Vector3.new(-radius2, 0.25, 0),
CFrame = cfo * CFrame.Angles(0, math.rad(180), 0)
},
-- TweenInfo, which can be anything (in this case 0.4 second transition)
TweenInfo.new(0.4),
-- BetFunc, which is a function ran in the middle of the tween. Optional.
function(p, m)
p.CFrame = p.CFrame * CFrame.Angles(0, 0, 0)
end
-- There is EndFunc which runs at the end of the tween, but it's not
-- used quite often. EndFunc is also optional.
)Library.CloneEffect
Library.Tween
Library.Create
Library.PlayCutscene
Commonly used utilities
Library.GetFPSFactor
Library.wait
Library.RunFor
Library.InView
Library.RandomAngle
Library.NumLerp
Library.FindFloor
Last updated