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

Is there an error in this script that could affect how a ClickDetector reacts?

local ID = 141627671


script.Parent.ClickDetector.MouseClick:connect(function(player)
	Game:GetService("MarketplaceService"):PromptPurchase(player, ID)
end)

In game when i click on the part, the mouse doesn't change to the "Click Hand" or whatever, and it activates if I click with the right mouse button. Is there a way to fix this?

2 answers

✓ Accepted answer
local ID = 141627671

a = Instance.new("ClickDetector",script.Parent)-- i did this and it worked

script.Parent.ClickDetector.MouseClick:connect(function(player)
    Game:GetService("MarketplaceService"):PromptPurchase(player, ID)
end)

I'm not sure that the parameter from a MouseClick event returns the player..

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