For some reason it says min is not a valid member of frame even though it is:https://gyazo.com/c07e1105333cfe2aa9926a7b522921f3. And I can't pass the argument for some reason? Local
01 | local minute = script.Parent.Min |
02 | local second = script.Parent.Sec |
03 | local event = game.ReplicatedStorage.Event |
04 |
05 | while true do |
06 | game.ReplicatedStorage.Event.Time:FireServer(second,minute) |
07 | minute.Text = minute.Value.Value |
08 | second.Text = minute.Value.Value |
09 | wait( 1 ) |
10 | end |
This is server
1 | game.ReplicatedStorage.Event.Time.OnServerEvent:Connect( function (player,sec,min) |
2 | for i = 1 , 60 do |
3 | sec.Value.Value = sec.Value.Value + i |
4 | if i = = 60 then |
5 | min.Value.Value = 1 |
6 | break |
7 | end |
8 | end |
9 | end ) |
If you're getting that min is not a child of frame then it might not have loaded before the script ran. As for the serverside if the gui was copied from startergui it will only exist locally and passing it as an argument will result in nil on the server.