Paint
Contains functions for controlling the color of a paintable Entity.
info
This module can only be used in Entity scripts.
Properties
color
Current Color of the Entity. This property is read-only.
Functions
setColor(color)
Applies the specified color.
Parameters
- color — The {{Color}} to apply.
Example
Set to red the color of a Magic platform entity.
function onStart()
local red = Color.new(255,0,0)
Paint.setColor(red)
end
resetColor()
Reverts to the default Color.
Example
Reset the color of a Magic platform entity after 2 seconds.
function onStart()
local green = Color.new(0,255,0)
Paint.setColor(green)
Task.wait(2)
Paint.resetColor()
end