So I was making gamepass what u can buy by touching and it gives u the item it works, BUT blocks can fire the script too so I was wondering how only humanoid can fire it so like if touched thing == humanoid then fire and if touched thing == block then not fire example, thanks!
local clicker = game.Workspace.Seller
local mps = game:GetService("MarketplaceService")
local gamepass_id = 13538006
clicker.Touched:Connect(function()
local player = game.Players.LocalPlayer
mps:PromptGamePassPurchase(player, gamepass_id)
end)
mps.PromptGamePassPurchaseFinished:Connect(function(player, id, purchased)
if id == gamepass_id and purchased then
game.ReplicatedStorage.Give6:FireServer()
end
end)