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

Text Label Wont Showup How do i Fix?

Asked by 3 years ago

I am trying to make random numbers pop up with GUIs there are different levels with their own random numbers I have 2 Text Labels in Replicated Storage with local scripts inside them the local scripts just make the text label move when the function is called here is the script

PopUp = script.Parent

wait (1)

PopUp:TweenPosition(UDim2.new(script.Parent.Position.X,0,-.1,0),---Location
    "Out",                                                      ---Easing Direction
    "Quad",                                                 ---Easing Style
    3,                                                          ---Time sitting
    false

)

for i = 1,60 do
    PopUp.Rotation = PopUp.Rotation + 1
    PopUp.TextStrokeTransparency = PopUp.TextStrokeTransparency + 0.02
    PopUp.TextTransparency = PopUp.TextTransparency + .02
    wait(.05)

end

MODULE SCRIPT

local module = {}


function module.PointScore_Tier1()

    print("starting")

    local players = game.Players.LocalPlayer
    local random = math.random(1,900)               
    local xnew = random/1000
    local new = game.ReplicatedStorage.PopUp1:Clone()
    print("Clone Successful")
    new.Parent = game.StarterGui.RandomXP   ---THIS MAKES THE PARENT OF THE POP UP VISIBLE MAKE IT YOUR SCREEN GUI IF CHANGED
    new.Position = UDim2.new(xnew, 0,1,0)
    new.Text = math.random(1,2000)                  
    new.TextColor3 = Color3.new(0, 1, 1)            
    new.Font = Enum.Font.Cartoon                    
    print("fully works")
    wait(10)
    game.StarterGui.RandomXP.PopUp1:Destroy()

end

module.PointScore_Tier5 = function()

    print("starting")

    local player = game.Players.LocalPlayer
    local random = math.random(1,900)               
    local xnew = random/1000
    local new = game.ReplicatedStorage.PopUp5:Clone()
    print("Clone Successful")
    new.Parent = game.StarterGui.RandomXP           
    new.Position = UDim2.new(xnew, 0,1,0)
    new.Text = math.random(1,10000)                 
    new.TextColor3 = Color3.new(0, 1, 1)            
    new.Font = Enum.Font.Cartoon                    
    print("fully works")

end

return module

Whenever I use a Script to call the Module Script Function it'll work for the first one but none after here is that script i have tried many different ways of making it work at this point i just want 1 to show when you join and once it finished a few seconds after the next one shows up

local functionTest = require(game.ServerScriptService.Person)

functionTest.PointScore_Tier1()
wait(10)
functionTest.PointScore_Tier5()

1 answer

Log in to vote
0
Answered by 3 years ago

I wasn't able to fully understand your expected result, but from what I gathered, it sounds like you are trying to run a script from ReplicatedStorage. No script can runs inside ReplicatedStorage. More than that, LocalScripts were designed to run in client envoriments, like StarterGui and a player's character. Of course, I could be totally wrong, as I may have misunderstood you. Correct me if you need.

0
No so what I’m doing is I have text labels inside replicates storage and when a function in a module script is called it clones the text label and moves it to startergui then does a tween animation I have it set it module script and a separate script that calls the module function when the game runs the first label works but after the wait and the second one is called 15 seconds later it doesn’t TheMiniMagic_YT 27 — 3y
Ad

Answer this question