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

Text Label wont Tween and Wont Disappear?

Asked by 3 years ago
Edited 3 years ago

Alright so I have a GUI in StarterGui it has a Child named PopUp1 I have a Module script with a function that chooses a random place for the text label to start and then a tween script that uses where it says to start and then go to a certain place but when I start it the GUI appears nothing happens then doesn't disappear i only want this to show on 1 persons screen and its the person clicking a brick

local module = {}

function module.PointScore_Tier1()

        local players = game.Players.LocalPlayer
        local random = math.random(1,900)               ---X Axis random generator DO 
        local xnew = random/1000
        game.StarterGui.RandomXP.PopUp1.Position = UDim2.new(xnew, 0,1,0)
        game.StarterGui.RandomXP.PopUp1.Text = math.random(1,2000)                  
        game.StarterGui.RandomXP.PopUp1.TextColor3 = Color3.new(1, 0, 0)            
        game.StarterGui.RandomXP.PopUp1.Font = Enum.Font.Cartoon                            print("fully works")
        local PopUp1 = game.StarterGui.RandomXP.PopUp1

        PopUp1.Visible = true

        wait(1)

    game.Players.:TweenPosition(UDim2.new(PopUp.Position.X,0,-.1,0)---Location
        print("cool tricks")

        wait(5)

        PopUp1.Visible = false
        print("i cant see now")

        end


return module


1 answer

Log in to vote
0
Answered by 3 years ago

The function wont run because it is on a module script. To run this, you have to require() the module script inside a local script and then call the function from the local script.

0
yea i did that the GUI still didnt pop up TheMiniMagic_YT 27 — 3y
0
Could you edit your question to show the local script? It might be a problem there JustinWe12 723 — 3y
Ad

Answer this question