Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Frame is not valid member of Frame what do i do?

I have problem it says Frame is not valid member of Frame what do i do? here my script

script.Parent.Frame.RebirthButton.MouseButton1Click:connect(function()
	if player.leaderstats.Cash.Value >= ((player.leaderstats.Rebirths.Value+1)*1000000)then
		game.ReplicatedStorage.RemoteEvents.Rebirth:FireServer()
		script.Parent.Frame.RebirthButton.Text = "Rebirth Successful!"
		wait(2)
		script.Parent.Frame.Visible = false
		open = false
		script.Parent.Frame.RebirthButton.Text = "Rebirth"
	end
end)

im starter to scripting

5 comments

0

where is ur script located at?

0

Please put your code in lua blocks.

0

Here you go! Pitched_mobile

0

well idk if ur script is located in the screenGui or in the frame itself

0

i put it in the frame it self

1 answer

✓ Accepted answer

since you put the script in the frame itself you were trying to search the frame inside of the frame so that doesnt work. simply remove the .Frame and it should work

script.Parent.RebirthButton.MouseButton1Click:connect(function()
    if player.leaderstats.Cash.Value >= ((player.leaderstats.Rebirths.Value+1)*1000000)then
        game.ReplicatedStorage.RemoteEvents.Rebirth:FireServer()
        script.Parent.RebirthButton.Text = "Rebirth Successful!"
        wait(2)
        script.Parent.Visible = false
        open = false
        script.Parent.RebirthButton.Text = "Rebirth"
    end
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.