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

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

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)

2 comments

0

Wheres frame

0

look in the gyazo link...

1 answer

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.

2 comments

0

how do i pass it then?

0

You don't, it doesn't exist on the server. You make the client handle the editing of guis instead.

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