|
| 28 Dec 2016 08:43 PM |
local agui = script.Intro:Clone() dist = 10
function onClicked() local p = game.Players:GetChildren() for i = 1, #p do if (p[i].Name ~= script.Owner.Value) then if (p[i].Character.Torso.Position - script.Parent.Position).magnitude < dist then agui:Clone().Parent = p[i].PlayerGui
end end end end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
okay so it's a click giver script i modified to give a GUI instead. i get that "if (p[i].Name ~= script.Owner.Value) then" presents it to the player that clicked the button, but how can i modify this to give it to everyone in the server instead? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 28 Dec 2016 09:37 PM |
local agui = script.Intro:Clone() dist = 10
function onClicked() local p = game.Players:GetChildren() for i = 1, #p do if (p[i].Name ~= script.Owner.Value) then agui:Clone().Parent = p[i].PlayerGui
end end end
script.Parent.ClickDetector.MouseClick:connect(onClicked) |
|
|
| Report Abuse |
|
|
| |
|