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

How do I make a GUI show up on individual screens instead of everyone's screen?

Asked by 8 years ago

I'm currently trying to figure out how to make this GUI show up on individual player screens instead of it showing up on everyone's screen.

local checkpoint1 = workspace.Map.checkpoint1
debounce = false
function onTouch(checkpoint1)
if debounce == true then return end
debounce = true
local checkPoint1Message = Instance.new("TextLabel")
    checkPoint1Message.Parent = script.Parent
    checkPoint1Message.BackgroundTransparency = 0.3
    checkPoint1Message.BackgroundColor = BrickColor.Black(0, 0, 0)
    checkPoint1Message.Position = UDim2.new(0, 0, 0, 0)
    checkPoint1Message.Size = UDim2.new(0, 300, 0, 100)
    checkPoint1Message.Text = "Checkpoint 1 Cleared!"
    checkPoint1Message.TextColor = BrickColor.White(255, 255, 255)
    checkPoint1Message.Font = Enum.Font.Legacy
    checkPoint1Message.FontSize = Enum.FontSize.Size24
    checkPoint1Message.TextScaled = true

--Checkpoint 1 "beeping" sound
local checkPoint1Sound = Instance.new("Sound")
    checkPoint1Sound.SoundId = "http://www.roblox.com/asset/?id=177578949"
    checkPoint1Sound.Parent = script.Parent
    checkPoint1Sound:Play()
    checkPoint1Sound.Volume = 1
    wait(1)
    checkPoint1Sound:Destroy()
    checkPoint1Message:Destroy()
    debounce = false
end

checkpoint1.Touched:connect(onTouch)
0
Where is the script located? e.g a Character or an instance inside a character etc. minikitkat 687 — 8y
0
Inside a ScreenGui. Raven_Caedes 95 — 8y

2 answers

Log in to vote
0
Answered by 8 years ago

Use PlayerGui instead of StarterGui.

Ad
Log in to vote
1
Answered by 8 years ago

if you want GUI's to show up in individual players screens, you need to put it into their PlayerGui, which is located here: game.Players.PlayerName.PlayerGui

Answer this question