Ahoy everyone, I’m working on a game and I have this weird bug where I’m trying to use a if statement with a string inside but the script doesn’t work.
Provide an overview of:
if script.Parent.TasksDone.Text == text3 then
claimButton.Visible = true
end
Sorry about that one "local task1 = script.Parent.Task1
local tasksDone = script.Parent.TasksDone
local player = game.Players.LocalPlayer
local inventoryButton = game.StarterGui.PC.PlacementUi.InventoryButton
local claimButton = script.Parent.ClaimButton
local tasksDone = false
if script.Parent.TasksDone.Text == “1/1 done” then
claimButton.Visible = true
end
script.Parent.ClaimButton.MouseButton1Click:Connect(function()
local amount = 20 – put the amount of money you wan’t the player to get
game.Players.LocalPlayer.leaderstats.Cash.Value = game.Players.LocalPlayer.leaderstats.Cash.Value + amount
end)"
local tasksDone = script.Parent.TasksDone
local player = game.Players.LocalPlayer
local inventoryButton = game.StarterGui.PC.PlacementUi.InventoryButton
local claimButton = script.Parent.ClaimButton
local tasksDone = false
local text1 = "Open the inventory"
local text2 = "0/1 done"
local text3 = "1/1 done"
task1.Text = text1
script.Parent.TasksDone.Text = text2
if script.Parent.TasksDone.Text == "1/1 done" then
claimButton.Visible = true
end
script.Parent.ClaimButton.MouseButton1Click:Connect(function()
local amount = 20
game.Players.LocalPlayer.leaderstats.Cash.Value = game.Players.LocalPlayer.leaderstats.Cash.Value + amount
end)