Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how do i fix this error 13:37:53.949 - Rebirth is not a valid member of Player?

Asked by 5 years ago
Edited 5 years ago

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`

0
WaitForChild is your best friend. Fifkee 2017 — 5y
0
You can replace FindFirstChild with WaitForChild since it always for the object to be found. Dalbertjdplayz 37 — 5y
0
You can replace FindFirstChild with WaitForChild since it always for the object to be found. Dalbertjdplayz 37 — 5y
0
Can you try click the little lua button and putting your code in that? That makes it easier for us to read. Just_Moop 27 — 5y
View all comments (2 more)
0
Thanks ManChild266 2 — 5y
0
i couldnt find a lua button ManChild266 2 — 5y

Answer this question