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

local minute = script.Parent.Min
local second = script.Parent.Sec
local event = game.ReplicatedStorage.Event

while true do 
    game.ReplicatedStorage.Event.Time:FireServer(second,minute)
    minute.Text = minute.Value.Value
    second.Text = minute.Value.Value
    wait(1)
end

This is server

game.ReplicatedStorage.Event.Time.OnServerEvent:Connect(function(player,sec,min)
    for i = 1,60 do
        sec.Value.Value = sec.Value.Value + i
        if i == 60 then
            min.Value.Value = 1
            break
        end
    end
end)
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