#Amount needed for a "Rebirth" doesn't show up

48 messages · Page 1 of 1 (latest)

strange mesa
#

hey y'all so I'm quite new to scripting and rn I'm making a click simulator game, I would need a explanation on how to fix the "Clicks needed for rebirth" button, when I try to load into a game there's no amount of clicks that it shows up

earnest geode
#

can u show me the explorer?

strange mesa
#

sure, gimme a sec

#

btw where it says "rebirth button" i forgot to rename the textlabels so imma do another ss after I renamed them.

#

here's the updated ss

fair owlBOT
#

studio** You are now Level 1! **studio

earnest geode
#
local player = game:GetService("Players").LocalPlayer
local clicksneeded = nil--path to clicksneeded

clicksneeded:GetPropertyChangedSignal("Value"):Connect(function()
    script.Parent.Text = "Clicks needed for rebirth:"..player.ClicksNeeded.Value
end)
earnest geode
#

with the script i sent you

#

instead of making a loop u can use this so everytime it changes it will update the text

strange mesa
#

alr lemme try

#

nope still doesn't work.

earnest geode
#

alright lemme take a deep look

strange mesa
#

still shows no amount.

earnest geode
#

is any error given in the output

strange mesa
#

I don't see any errors from what I can see

earnest geode
#

does it put the numbervalue in the player ?

strange mesa
#

uh where do i check that? sorry I'm new to scripting

#

this one?

earnest geode
#

yes thanks

#

apparently no Value is added to it

#

give me ill try to ensure its added

fair owlBOT
#

studio** You are now Level 1! **studio

earnest geode
#
game.Players.PlayerAdded: Connect(function(player)
    local leaderstats = Instance.new("Folder", player)
    leaderstats.Name = "leaderstats"
    local clicks = Instance.new("NumberValue")
    clicks.Name = "Clicks"
    clicks.Parent = leaderstats
    clicks.Value = 0
    local rebirths = Instance.new("NumberValue")
    rebirths.Name = "Rebirths"
    rebirths.Value = 0
    rebirths.Parent = leaderstats
    local clicksAdd = Instance.new("NumberValue")
    clicksAdd = "ClicksToAdd"
    clicksAdd.Value = 1
    clicksAdd.Parent = player
    local clicksNeeded = Instance.new("NumberValue")
    clicksNeeded.Name = "ClicksNeeded"
    clicksNeeded.Value = 125
    clicksNeeded.Parent = player
end)

#

let me know

#

also check the output for errors

#

instead of local clicks Instance.new("NumberValue", leaderstats)

i did

#
game.Players.PlayerAdded: Connect(function(player)
    local leaderstats = Instance.new("Folder", player)
    leaderstats.Name = "leaderstats"
    local clicks = Instance.new("NumberValue")
    clicks.Name = "Clicks"
    clicks.Parent = leaderstats
    clicks.Value = 0
#

added ```lua
rebirths.Parent = leaderstats

#

@strange mesa

strange mesa
#

alr lemme check

strange mesa
earnest geode
#

usually u wanna put that in a server script as i noticed u added as function "Player" in game.players.playeradded

earnest geode
#

@strange mesa

game.Players.PlayerAdded: Connect(function(player)
    local leaderstats = Instance.new("Folder")
    leaderstats.Name = "leaderstats"
    leaderstats.Parent = player
    local clicks = Instance.new("NumberValue")
    clicks.Name = "Clicks"
    clicks.Parent = leaderstats
    clicks.Value = 0
    local rebirths = Instance.new("NumberValue")
    rebirths.Name = "Rebirths"
    rebirths.Value = 0
    rebirths.Parent = leaderstats
    local clicksAdd = Instance.new("NumberValue")
    clicksAdd.Name = "ClicksToAdd"
    clicksAdd.Value = 1
    clicksAdd.Parent = player
    local clicksNeeded = Instance.new("NumberValue")
    clicksNeeded.Name = "ClicksNeeded"
    clicksNeeded.Value = 125
    clicksNeeded.Parent = player
end)


``` missed a parent
#

works to me

#

incase that doesnt work

#

try this

#
game.Players.PlayerAdded: Connect(function(player)
    local leaderstats = Instance.new("Folder")
    leaderstats.Name = "leaderstats"
    leaderstats.Parent = player
    local clicks = Instance.new("NumberValue")
    clicks.Name = "Clicks"
    clicks.Parent = leaderstats
    clicks.Value = 0
    local rebirths = Instance.new("NumberValue")
    rebirths.Name = "Rebirths"
    rebirths.Value = 0
    rebirths.Parent = leaderstats
    local clicksAdd = Instance.new("NumberValue")
    clicksAdd.Name = "ClicksToAdd"
    clicksAdd.Value = 1
    clicksAdd.Parent = player
    local clicksNeeded = Instance.new("NumberValue")
    clicksNeeded.Name = "ClicksNeeded"
    clicksNeeded.Value = 125
    clicksNeeded.Parent = player
end)

strange mesa
#

alright

earnest geode
#

@strange mesa news?

strange mesa
#

it works ty