-- Script, not a LocalScript -- Acceleration Coil is just a speed coil in Lighting to clone.(Name change) local assetId = 212641536 script.Parent.ClickDetector.MouseClick:Connect(function(plr) if game:GetService("MarketplaceService"):PlayerOwnsAsset(assetId) then game.Lighting["Acceleration Coil"]:Clone().Parent = game.Players.LocalPlayer.Backpack game.Lighting["Acceleration Coil"]:Clone().Parent = game.Players.LocalPlayer.StarterGear end end) -- when a player clicks on the machine, ask if they want to buy the item script.Parent.ClickDetector.MouseClick:Connect(function(player) local promptPurchase = game:GetService("MarketplaceService") promptPurchase:PromptPurchase(player, assetId) game.Workspace.Shelf.SpeedCoil:Clone() end)
This script seems to work fine before the Studio Update, but does not work after the update. I think it's about experimental mode. Help me fix this script.
-- Script, not a LocalScript -- Acceleration Coil is just a speed coil in Lighting to clone.(Name change) local assetId = 212641536 script.Parent.ClickDetector.MouseClick:Connect(function(plr) if game:GetService("MarketplaceService"):PlayerOwnsAsset(plr,assetId) then game.Lighting["Acceleration Coil"]:Clone().Parent = plr.Backpack game.Lighting["Acceleration Coil"]:Clone().Parent = plr.StarterGear end end) -- when a player clicks on the machine, ask if they want to buy the item script.Parent.ClickDetector.MouseClick:Connect(function(player) local promptPurchase = game:GetService("MarketplaceService") promptPurchase:PromptPurchase(player, assetId) workspace.Shelf.SpeedCoil:Clone() end)