So this is the script I have. It has some other stuff in it but I'm confused on the spotlight.color thingy. If you find any other errors with the scripts feel free to tell me :D
wait() player = game.Players.LocalPlayer player.CameraMode = Enum.CameraMode.LockFirstPerson SpotLight = Instance.new("SpotLight", player.Character.Head) SpotLight.Brightness = (.85) SpotLight.Angle = (120) SpotLight.Color = player.Character.Head.Color
Parts don't have Colors, instead they have BrickColors.
wait() player = game.Players.LocalPlayer player.CameraMode = Enum.CameraMode.LockFirstPerson SpotLight = Instance.new("SpotLight", player.Character.Head) SpotLight.Brightness = (.85) SpotLight.Angle = (120) SpotLight.Color = player.Character.Head.BrickColor
Instead of "Color", you need to use the function BrickColor(), which returns the color of the part. (Sorry if I am wrong about it being a function, but I'm pretty sure you would need to use player.Character.Head.BrickColor()
)
EDIT: Sorry, it's not a function, so just remove all the parentheses in my example, so it should be player.Character.Head.BrickColor
A part's color is made up of a BrickColor
. A spotlight's color is made up of a Color3
.
Basically what you need, is a way of grabbing the part's BrickColor
, and somehow get a Color3
out of that. Luckily, ROBLOX makes this quite simple, by adding a Color
property to BrickColor
. This means that you would only have to use player.Character.Head.BrickColor.Color
to get the Color3
value out of the part!
Locked by JesseSong
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?