--> Server Script 1
local value = ...
-- "script to change a variable"
value.Value += 42
--> Local script
local value = ...
local remote = ...
local function OnChanged()
remote:FireServer()
end
value:GetPropertyChangedSignal("Value"):Connect(OnChanged)
--> Server Script 2
local remote = ...
local function OnEvent(player: Player)
-- "where it activates my code"
end
remote.OnServerEvent:Connect(OnEvent)