-- 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.

4 comments
this should be inside the button not inside a local script
and LocalPlayer only works in localcsripts
Because when the roblox studio update it like when you test, it use sever script and maybe your script are client i guess
I tried this on LocalScript doesn't work