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)
####put your code in a block, blue Lua icon in the editor

1 comment
the error is caused by a typo. The function is called GetService