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

Screen Gui tweening but not appearing?

Asked by 5 years ago
01local Part = game.Workspace.Shop
02local Gui = game.StarterGui.BackpackShopGui.Frame
03local TweenService = game:GetService("TweenService")
04 
05Gui.Position = UDim2.new(0.25, 0,-1, 0)
06 
07Part.Touched:Connect(function(hit)
08    local Hit = hit.Parent:FindFirstChild("Humanoid")
09    if Hit then
10        local player = game.Players:GetPlayerFromCharacter(hit.Parent)
11        if player then
12            if player.OtherInfo.Backpack.Value < player.OtherInfo.MaxBackpack.Value then
13                Gui:TweenPosition(
14                    UDim2.new(0.25, 0,0.01, 0),
15                    "In",
View all 23 lines...

I have this code to pop up a gui window when a player steps on a part but it the explorer it's tweening the gui but when you play the game nothing happens. Any ideas?

1 answer

Log in to vote
0
Answered by 5 years ago

You have to tween the gui in the player.PlayerGui not starter Gui

Ad

Answer this question