So I'm making a lighting system, and I wanna send a colour code through the remote and tween all the parts in the folder to said colour, but I'm having issues sending the remote. My entire code is here (serverside)

--[[
// Experimental tweening module thingy.
--]]
local sscode = game.Workspace.MoodLighting.SuperSecretCode
local revent = game.ReplicatedStorage[sscode.Value]

revent.OnServerEvent:Connect(function(Player, Colour)
	

local TS = game:GetService('TweenService')


-- local color3val = 255,0,0


local tweenInfo = TweenInfo.new(
	2, -->> Tween time.
	Enum.EasingStyle.Linear, -->> Tween style. 
	Enum.EasingDirection.Out,  -->> Easing direction, don't recommend changing.
	0, -->> How many times the tween repeats, don't recommend changing.
	false, -->> Does the tween reverse? Don't recommend changing.
	 0 -->> How long does it take to tween?
)
local light = script.Parent.Light


local partProperties = {
        Color = Color3.fromRGB(Colour),
}


TS:Create(light.Parent, tweenInfo, partProperties):Play()
	TS:Create(light, tweenInfo, partProperties):Play()
	print(Colour) --Debugging.
	end)

The little bit of my client side code that sends the remote is here;

preset1.Preview.MouseButton1Click:Connect(function()
		
	
	revent:FireServer(preset1.Colour.Value)
	print('Fired.)
		end)

When I click the button that fires the remote, the console prints '1,0,0' but if I check the part's colour actually tweened to 0,0,0 Notes: I am using a Color3Value so there isn't any string issues here.

1 comment

0

not really sure, but I think you can't send color3 values, try sending its r,g,b and transforming back to color3