Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Can someone help me make this server sided and client sided?

So basically I'm making a timer script and it seems to be working, but the problem is when I press play the timer doesn't go down. But when I go to the "current server" thing the timers going down and everything works, and when I got to "current client" it doesn't go down. Can someone help me? This is my code(its 2 scripts)

local Timer = game.StarterGui.ScreenGui.TextLabel
local TimerNumber = game.ServerStorage.Value
local TimerSwitch = game.ServerStorage.TimerSwitch
repeat
	wait(1.1)
	Timer.Text = TimerNumber.Value
until 
TimerSwitch == true
local Timer = game.StarterGui.ScreenGui.TextLabel
local TimerNumber = game.ServerStorage.Value
local function Timer1()
repeat
wait(1)
TimerNumber.Value -= 1
until
TimerNumber.Value <= 0
Timer.Visible = false
end

Timer1()
 

1 comment

0

use a remoteevent, more specifically ,the :FireAllClients() command

1 answer

Since you are using a script to change a value, the changes will only work on the server, so to fix this use a remote event to transmit the value instead of a value.

1 comment

0

so I just put all my script inside the remote event?

This discussion is preserved as it was. New answers, comments, and votes are closed.