And here is my script
local buy = script.Parent local ReplicatedStorage = game:GetServive('ServerScriptService') local canBuy = true local sellPrice = 50 local function buy_Dropper(otherPart) local player = game.Players.GetPlayerFromCharacter(otherPart.Parent) local playerCandies = player.leaderstats.Candies if player and playerCandies.Value > sellPrice and canBuy then canBuy = false playerCandies.Value = playerCandies.Value - sellPrice local Dropper = ReplicatedStorage:FindFirstChild("Dropper") Dropper.Sell.Value = sellPrice/2 local newDropper = Dropper:Clone() newDropper.Parent = game.Workspace newDropper:SetPrimaryPartCFrame(buy.CFrame + Vector3.new(0,0,1)) newDropper.Name = player.Name buy:Destroy() end end buy.Touched:Connect(buy_Dropper)
There is a typo. It should be GetService instead on GetServive