Simple coding doesn't work. The error is
17:08:07.256 - Unable to cast Instance to int64 and so on, line 5 stack end
local market=game:GetService("MarketplaceService")
local player = game:GetService("Players").LocalPlayer
local button = script.Parent
if market:UserOwnsGamePassAsync(player,7218055) then
button.Visible = true
else
button.Visible = false
end
function activate()
button.Parent.StoreFrame.Visible = not button.Parent.StoreFrame.Visible
end
script.Parent.MouseButton1Click:Connect(activate)
Am i using this function right? Why can't it get the "int64"?
(localscript)

1 comment
update: it worked thanks bro