Why isnt my script raising the Text by one each time it gives them money/view the line with the stars is what I need help with. The stars were there as a highlighter
local i = 1
local price = 1
local y = math.random(10)
local dep = script.Parent.Parent
local player = game.Players.LocalPlayer
local stats = player:WaitForChild("leaderstats")
local z = 1 + stats.Subscribers.Value
function click()
if script.Parent.Visible == true then
script.Parent.Parent.Cav.Visible = false
dep.micro.Visible = false
dep.online.Visible = false
dep.fpc.Visible = false
dep.bill.Visible = false
dep.sap.Visible = true
script.Parent.Parent.Parent.Parent.pot.Visible = true
for _ = 1,5 do
stats.Views.Value = stats.Views.Value + 1
***script.Parent.Parent.Parent.Parent.pot.Text = "Views:".. i + 1***
wait(1)
end
end
end
script.Parent.MouseButton1Click:Connect(click)

7 comments
I fixed the indentation and put the code in a code block.
thank u
:thumbs_up:
You're not upping
iat all;iis staying the same. Did you perhaps mean to doi = i + 1after?I had problems when trying to put that into my code how would u add it?
After line 20. :p
it shows an error