For some reason otherstuff is not a part of the player eventhough it is
local rp = game:GetService("ReplicatedStorage")
local event = rp.Rebirth
local plr = game:GetService("Players").PlayerAdded:Wait()
local othersutff = plr.OtherStuff
local rebirth = othersutff.rebirths
local rebirthcost = plr.OtherStuff.rebirthcost
local cash = plr.leaderstats.Cash
local wood = plr.leaderstats.Wood
event.OnServerEvent:Connect(function()
print(cash.Value)
print(rebirthcost.Value)
if cash.Value >= rebirthcost.Value then
rebirthcost.Value *= 3.75
rebirth.Value = rebirth.Value + 0.1
math.ceil(rebirth.Value)
math.ceil(rebirthcost.Value)
cash.Value = 0
wood.Value = 0
print(rebirth.Value)
else
print("not enough money")
end
end)