Basically I am trying to make a points light color change. When the color numbers print, they print as I desire. Printed Output, 198,48,50 But the point light color comes out as, 0,198,48 | I expected the point light color to be 198,48,50
Local Script:
function fireRBG()
local backgroundColor = script.Parent.BackgroundColor3
local R = backgroundColor.R*255
local G = backgroundColor.G*255
local B = backgroundColor.B*255
game.ReplicatedStorage.Color:FireServer(R,G,B)
print(R,G,B)
script.Parent.MouseButton1Click:Connect(fireRBG)
end
Server Script:
**Server Script:**
game.ReplicatedStorage.Color.OnServerEvent:Connect(function(R, G, B)
script.Parent.Color = Color3.fromRGB(R, G, B)
end)
It’s because the first argument of .OnServerEvent is Player.
game.ReplicatedStorage.Color.OnServerEvent:Connect(function(player, R, G, B)
print(player, 'fired this event!')
script.Parent.Color = Color3.fromRGB(R, G, B)
end)
Your connection also isn’t set up properly.
local function fireRBG()
local backgroundColor = script.Parent.BackgroundColor3
local R = backgroundColor.R*255
local G = backgroundColor.G*255
local B = backgroundColor.B*255
game.ReplicatedStorage.Color:FireServer(R,G,B)
print(R,G,B)
end
script.Parent.MouseButton1Click:Connect(fireRBG)