Effects
Client-local visual effects: full-screen flashes and translucent preview geometry.
local Effects = game:GetService("Effects")Methods
Flash
Effects:Flash(color: Color3, seconds: number?)Overlays color on the full screen and fades it out over seconds (default 0.4).
Effects:Flash(Color3.fromRGB(255, 40, 40), 0.3)CreateGhost
Effects:CreateGhost(): GhostCreates a translucent preview shape, typically used for placement previews. Maximum 16 per client.
Ghost
Show
ghost:Show(shape: string, centre: Vector3, size: Vector3, rotation: Vector3, color: Color3, opacity: number?)Renders the ghost with the given geometry. shape is a part shape such as "block" or "sphere". rotation is in degrees. opacity defaults to 0.45.
local Input = game:GetService("Input")
local ghost = Effects:CreateGhost()
while true do
task.wait()
local spot = Input:OnPlane(Vector3.new(0, 0, 0), Vector3.new(0, 1, 0))
if spot then
ghost:Show("block", spot + Vector3.new(0, 1, 0), Vector3.new(4, 2, 4), Vector3.new(0, 0, 0), Color3.fromRGB(80, 160, 255))
else
ghost:Hide()
end
endHide
ghost:Hide()Hides the ghost.