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

Why the text lable does not change when i run the code?[SOLVED]

Asked by 3 years ago
Edited 3 years ago

I try to code that when the player pressed a button then the text will changed into this lable RebirthFrame.RequiredIlmu.Text = "Ilmu Yang Dibutuhkan ".. ilmuDibutuhkan but the lable only show as "Ilmu Yang Dibutuhkan 15". I need to make that 15 to be Rebirths.Value*15+15. And my rebirths.value is 3 right now when i join the game

please help me

local player = game.Players.LocalPlayer

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Rebirth = ReplicatedStorage:WaitForChild("Rebirth")

local OpenRebirthFrame = script.Parent:WaitForChild("OpenRebirthFrame")
local RebirthFrame = script.Parent:WaitForChild("RebirthFrame")
local RebirthButton = RebirthFrame:WaitForChild("RebirthButton")

local leaderstats = player:WaitForChild("leaderstats")
local Rebirths = leaderstats:WaitForChild("Kepintaran")
local ilmuDibutuhkan = Rebirths.Value *15+15

OpenRebirthFrame.MouseButton1Up:Connect(function()
    RebirthFrame.Visible = not RebirthFrame.Visible
    RebirthFrame.RequiredIlmu.Text = "Ilmu Yang Dibutuhkan ".. ilmuDibutuhkan
    RebirthFrame.MultiplierInfo.Text = "Kelipatannya Akan Menjadi ".. Rebirths.Value + 2 .. "X"
end)

Answer this question