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

This changed event wont even fire, anyone know why?

No errors, just wont work. This is a server script inside ReplicatedStorage.

game.Workspace.ReplicatedStorage.Values.NextRoundLoad.Changed:connect(function()
	if game.Workspace.ReplicatedStorage.Values.NextRoundLoad.Value==true then
		local n=math.random(1)
		if n==1 then
			script.Parent.Value=game.ReplicatedStorage.Maps.Asylum.Name
		end
	end
end)

This is the setup: http://prntscr.com/jtccz3

1 answer

✓ Accepted answer

Try this:

local R = game:GetService('ReplicatedStorage')

R.Values:WaitForChild('NextRoundLoad').Changed:Connect(function()
	if R.Values.NextRoundLoad then
		local n = math.random(1)
		if n == 1 then
			script.Parent.Value = r.Maps.Asylum.Name
		end
	end
end)

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