Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to create a all player image?

Asked by 8 years ago

I want to create a text that can be seen by all players at the top of their screen. I have tried everything from screen gui's and such. I want it to appear at the end of the script. Like where the cancolide is changed. I want a text at the top of the screen that displays to all players that says. Evacuate to sector J

local L1 = workspace.Light1
local L2 = workspace.Light2
local L3 = workspace.Light3
local L4 = workspace.Light4
local L5 = workspace.Light5
local L6 = workspace.Light6
local L7 = workspace.Light7
local L8 = workspace.Light8
local d1 = workspace.Door1
local d2 = workspace.Door2
local d3 = workspace.Door3
local P = workspace.Plat
local But = workspace.Button
local s = workspace.Screen
function onClick()
    But.ClickDetector:Remove()
    s.SurfaceGui.TextBox.Text = "Lockdown In Progress"
    s.SurfaceGui.TextBox.TextColor3 = Color3.new(255, 0, 0)
    game.ServerScriptService.Dublicate.Disabled = true
    game.workspace.Sound:Play()
    wait(3)
    L1.SurfaceLight.Color = Color3.new(255, 0, 0) 
    L2.SurfaceLight.Color = Color3.new(255, 0, 0) 
    L3.SurfaceLight.Color = Color3.new(255, 0, 0) 
    L4.SurfaceLight.Color = Color3.new(255, 0, 0) 
    L5.SurfaceLight.Color = Color3.new(255, 0, 0) 
    L6.SurfaceLight.Color = Color3.new(255, 0, 0) 
    L7.SurfaceLight.Color = Color3.new(255, 0, 0) 
    L8.SurfaceLight.Color = Color3.new(255, 0, 0) 
    L1.SurfaceLight.Brightness = 10
    L2.SurfaceLight.Brightness = 10
    L3.SurfaceLight.Brightness = 10
    L4.SurfaceLight.Brightness = 10
    L5.SurfaceLight.Brightness = 10
    L6.SurfaceLight.Brightness = 10
    L7.SurfaceLight.Brightness = 10
    L8.SurfaceLight.Brightness = 10
    L1.Material = 'Plastic'
    L2.Material = 'Plastic'
    L3.Material = 'Plastic'
    L4.Material = 'Plastic'
    L5.Material = 'Plastic'
    L6.Material = 'Plastic'
    L7.Material = 'Plastic'
    L8.Material = 'Plastic'
    L1.BrickColor = BrickColor.new("Really red")
    L2.BrickColor = BrickColor.new("Really red")
    L3.BrickColor = BrickColor.new("Really red")
    L4.BrickColor = BrickColor.new("Really red")
    L5.BrickColor = BrickColor.new("Really red")
    L6.BrickColor = BrickColor.new("Really red")
    L7.BrickColor = BrickColor.new("Really red")
    L8.BrickColor = BrickColor.new("Really red")
    game.workspace.Sound:Pause()
    game.workspace.sound:Play()
    wait(10)
    game.workspace.sound:Pause()
    game.workspace.Door:Play()
    wait(3)
    d3.CFrame = CFrame.new(87.5, -6, 25.5)
    d2.CFrame = CFrame.new(87.5, 8.5, -82.5)
    d1.CFrame = CFrame.new(31.5, 8.5, -78.5)
    wait(3)
    game.workspace.Door:Pause()
    game.workspace.Evac:Play()
    wait(10)
    game.workspace.Evac:Pause()
    game.workspace.Music:Play()
    wait(115)
    game.workspace.Music:Pause()
    game.workspace.Alarm:Play()
    wait(5)
    game.workspace.Destruct:Play()
    wait(3)
    game.workspace.Destruct:Pause()
    game.workspace.Emerge:Play()
    wait(5)
    game.workspace.Emerge:Pause()
    P.CFrame = CFrame.new(149, 19.5, -318.5)
    game.workspace.D.Script.Disabled = true
    game.workspace.D.CanCollide = true

end
But.ClickDetector.MouseClick:connect(onClick)

0
wat NoahWillCode 370 — 8y
0
Its a long code ok... Conmmander 479 — 8y
0
You could use a RemoteEvent and fire it to all clients. NoahWillCode 370 — 8y
0
Possible. Conmmander 479 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

here is a script that will make a textLabel visible to all players.

local Gui = Instance.new("ScreenGui")
local g = Gui:Clone()
for i,v in pairs(game.Players:GetChildren()) do
g.Parent = v.PlayerGui
local text = Instance.new("TextLabel",g)
wait()
text.Text = "What ever you want Here"
end

This is making a gui and putting it in the playerGui of each player in the game

0
This isn't what the question is asking. He wants to syncronize a GUI TextLabel in PlayerGui for all Players. adark 5487 — 8y
0
i edited it. I didnt read his question because he told me in the community chat. It was an honest mistake and i feel pity on whoever down voted me koolkid8099 705 — 8y
0
Adark he fixed it. Conmmander 479 — 8y
Ad

Answer this question