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

My gui isnt popping up after purchase, why?

Asked by 5 years ago

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

Log in to vote
0
Answered by
Alphexus 498 Moderation Voter
5 years ago

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.

0
Didn't work. It's a script not a local script so I can't access localplayer :/ CaptainEmpyreus 0 — 5y
0
You can access LocalPlayer through a server script if you do a repeat wait() until game.Players.LocalPlayer Alphexus 498 — 5y
Ad

Answer this question