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
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.