R is not a vaild member of Frame

Hello, I am getting this error:
r is not a vaild member of Frame "Players.funfoxrr.PlayerGui.ScreenGui.Frame"
Line 6
Even though my script looks like this:

script.Parent.MouseButton1Click:Connect(function()
	game.ReplicatedStorage.RemoteEvents.Server.ReloadLevel:FireServer({
		["Size"] = tonumber(script.Parent.Parent.gridSize.TextBox.Text),
		["Experimental"] = script.Parent.Parent.useExperimental.Value.Value
	})
	script.Parent.Parent.Parent.Parent.Realoading.Visible = true --THIS LINE CAUSES ERROR
	script.Parent.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
end)

Here is my ScreenGui:
image

This only happens on the Roblox Client.
The highlighted script is giving me the error.
All help is appreciated!

If it only happens on the Roblox client, you might have not published your game with the correct code. Try republishing it.

1 Like

It doesn’t seem like it is the code shown is what the game is seeing. You may need to ensure you have commited the script and then republished it.

1 Like

I have just published the changes and nothing happened…