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

My gui isnt popping up after purchase, why?

I got this script local Red = Instance.new("TextButton")

Red.Name = "Red"

Red.Text = "Red"

Red.Parent = game.StarterGui.TrailInv.Inventory

Red.BackgroundColor3 = Color3.fromRGB(255,255,255)

Red.TextColor3 = Color3.fromRGB(15, 91, 255)

Red.TextScaled = true

Red.TextSize = 14

Red.Font = "SourceSansBold"

Red.Size = UDim2.new(0, 160,0, 50)

Red.Position = UDim2.new(0.677, 0,0.194, 0)

this is supposed to make a new gui if the person bought the dev product but it isnt. I also tried to just make it visible and unvisible. Could someone post a answer containing both the methods please? thanks

1 answer

Try putting the parent to game.Players.LocalPlayer.PlayerGui instead of StarterGui. If this helped you, please accept my answer. If not, maybe if theres a output could you paste it so I can help you.

2 comments

0

Didn't work. It's a script not a local script so I can't access localplayer :/

0

You can access LocalPlayer through a server script if you do a repeat wait() until game.Players.LocalPlayer

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