01 | local MarketplaceService = game:GetService( "MarketplaceService" ) |
02 | local TeleportService = game:GetService( "TeleportService" ) |
03 | local Players = game:GetService( "Players" ) |
04 |
05 | local teleporter = script.Parent |
06 | local showPrompt = true |
07 |
08 | local placeID_Premium = 012345678 |
09 |
10 | local function onTeleporterTouch(otherPart) |
11 |
12 | local player = Players:GetPlayerFromCharacter(otherPart.Parent) |
13 | if not player then return end |
14 |
15 | -- If the user already has Premium, teleport them to the Premium-only place |
Change teleporter variable to refer to a ClickDetector.
change teleporter.Touched:connect... to teleporter.MouseClick:connect...
etc.
Its actually pretty simple. 1. Put in a ClickDetector.
1 | teleporter.ClickDetector.MouseClick:Connect(onTeleporterTouch) |
assuming this is the line that you wanted converted to click, this should help you out.