Unable to cast Instance to int64?

I’m working on an update rolling out some bug fixes to my model DonateUI, but I keep getting this error image .

My script (localscript) is

local gpid = workspace["DonateUI Package"].gamepassId
script.Parent.MouseButton1Click:Connect(function()
	local player = game:GetService("Players").LocalPlayer
	
	
	script.Parent.TextTransparency = 1
	script.Parent.Parent.Text.TextLabel.Visible = false
	script.Parent.Parent.Title.Visible = false
		script.Parent:TweenSize(UDim2.new(0, 0, -0.043, 0), "Out", "Quart", 0.2)
		wait(0.25)
		script.Parent.Parent.Text:TweenSize(UDim2.new(0.958, 0, 0, 0), "Out", "Quart", 0.2)
		wait(0.3)
		script.Parent.Parent.Parent:TweenSize(UDim2.new(0, 265, 0, 0), "Out", "Quart", 0.4)
	wait(1)
	if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, gpid) then
	script.Parent.Parent.Parent.Parent:Destroy()
	else
		game.ReplicatedStorage.DonateClient:Clone().Parent = script.Parent.Parent.Parent.Parent.Parent
		wait(0.2)
		script.Parent.Parent.Parent.Parent:Destroy()
		end
end)

Any support is appreciated

4 Likes

gamepassId is an instance, add .Value at the end, as I assume it’s a IntValue / NumberValue.

4 Likes

.Value is the pinical of forgetting things.

4 Likes