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

GUI visible to all screens/players?

So currently I have a frame which comes visible to the screen when a button is pressed, but it only shows for that player who clicked the button. How do I make it so it runs through all screens?

Part of script :

function songp()
	local ms = script.Parent.Parent.Parent.MusicP
	local mt = script.Parent.Parent.Parent.MusicP.Text1
	local mt2 = script.Parent.Parent.Parent.MusicP.Text2
	local msb = script.Parent.Parent.Parent.MusicP.Bevel
	ms:TweenSize(UDim2.new(0,200, 0, 45), "Out", "Quad", 1, false)
	msb:TweenSize(UDim2.new(0,200, 0, 3), "Out", "Quad", 1, false)
	wait(1)
	for i=1,10 do
	mt.TextTransparency = mt.TextTransparency - 0.1
	mt2.TextTransparency = mt2.TextTransparency - 0.1
	p1.TextTransparency = p1.TextTransparency - 0.1
	p2.TextTransparency = p2.TextTransparency - 0.1
	wait(0.1)
	end
	wait(5)
	for i=1,10 do
	mt.TextTransparency = mt.TextTransparency + 0.1
	mt2.TextTransparency = mt2.TextTransparency + 0.1
	p1.TextTransparency = p1.TextTransparency + 0.1
	p2.TextTransparency = p2.TextTransparency + 0.1
	wait(0.1)
	end
	ms:TweenSize(UDim2.new(0,0, 0, 45), "Out", "Quad", 1, false)
	msb:TweenSize(UDim2.new(0,0, 0, 3), "Out", "Quad", 1, false)	
end
songp()

1 comment

0

I Edited my answer to tell where to put it

1 answer

✓ Accepted answer

To do this you have to put your script in a loop that goes through all players. This would simply be done by doing this :

for i,v in pairs(game:GetService("Players"):GetPlayers()) do

end

This will loop through all players and do as you specify. Put whatever scripts you have in the loop, and its done. You may have to change around some of your variables You should put this script at the same spot the other is located, or just edit this into your current script

2 comments

0

Where should this go?

0

I am alittle confused, mind doing that?

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