I was thinking
while true do
script.Parent.Color = (255, 255, 255) -- and like 2 more
end
any helpers?
I was thinking
while true do
script.Parent.Color = (255, 255, 255) -- and like 2 more
end
any helpers?
Do you want it to change with an script or how ? because if I am not wrong you can always set the PointLight object in a part and change the color using the properties options and change it to any color you want and add shadows to it Hope it helped
Datatypes are not matching, that why you get an error. First (255, 255, 255) is not a valid Lua literal. While with native Lua datatypes most of the time you don't have to pay attention to the datatype because Lua is dynamic typed and can convert between datatypes implicitly. For example
a = 2
b = "2"
print(a+b)
If you run that code, you will get 4.
Variable a is holding an integer datatype, while variable b is holding a string. In a static typed language like C you would get an error unless you first explicitly convert b to a integer, but Lua does that implicitly (however in some cases where the interpreter is not smart enough, you will need to use tostring or tonumber).
But that doesn't happen with most Roblox datatypes. So your code should be
while true do
script.Parent.Color = Color3.new(1, 1, 1)
end
This discussion is preserved as it was. New answers, comments, and votes are closed.
5 comments
I want it to change the colors at certain moments
In that case you might need the use of LocalScript in the part and use the CFrame option and the loop "if pressed" loop to make it change when it's touched (or
(or use the" :OnTouch " string when that part is touched) or use the wait() string and use a function as
local = game.workspace.part-- I think its how it starts and then use the if player haspressed "part"-- name of the part - then wait ()-- amount of time in seconds function= Color3.new() --choose the color and paste the properties inside the parenthesis remember for every "50" in properties you turn them to ".20 in the script and separate them by "", "", "" dont forget to add "end" when finished
Why don't you put that code in your answer? Just edit your answer.