im making a simulator and when i was making the rebirth system and i came across this error 13:37:53.949 - Rebirth is not a valid member of Player here's my code
local repStorage = game:GetService("ReplicatedStorage") local remote = repStorage:FindFirstChild("RebirthClick")
local button = script.Parent
local debounce = false
button.MouseButton1Click:Connect(function() local rebirths = game.Players.LocalPlayer.leaderstats:FindFirstChild("Rebirths") if not debounce then debounce = true local playerPoint = rebirths remote:FireServer(playerPoint) wait(0.01) debounce = false end end)
repeat local textButton = script.Parent textButton.Text = "Rebirth: ".. tostring(100 * game.Players.LocalPlayer.Rebirths.Value + 1) .." points required" wait(0.01) until script.Parent == nil`

6 comments
WaitForChild is your best friend.
You can replace FindFirstChild with WaitForChild since it always for the object to be found.
You can replace FindFirstChild with WaitForChild since it always for the object to be found.
Can you try click the little lua button and putting your code in that? That makes it easier for us to read.
Thanks
i couldnt find a lua button