Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Min is not a valid member of Frame problem? and "Attempted to call a nil value?"

Asked by 6 years ago

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

01local minute = script.Parent.Min
02local second = script.Parent.Sec
03local event = game.ReplicatedStorage.Event
04 
05while 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)
10end

This is server

1game.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
9end)
0
Wheres frame DaggerOf_Fly -24 — 6y
0
look in the gyazo link... WillBe_Stoped 71 — 6y

1 answer

Log in to vote
0
Answered by
gullet 471 Moderation Voter
6 years ago

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.

0
how do i pass it then? WillBe_Stoped 71 — 6y
0
You don't, it doesn't exist on the server. You make the client handle the editing of guis instead. gullet 471 — 6y
Ad

Answer this question