I’m just making a simple “Shop” like script, however, in the RemoteEvent arguments, it complains about:
attempt to compare number <= string
Code:
local players = game:GetService("Players")
local serverScriptService = game:GetService("ServerScriptService")
local buySlides = workspace:FindFirstChild("SlideBuy")
local replicatedStorage = game:GetService("ReplicatedStorage")
local events = replicatedStorage.Events
events.BuySlide.OnServerEvent:Connect(function(player,slideToBuy,price)
if player["SlideData"][slideToBuy].Value == true then
return
end
if slideToBuy == "Slide1" then
return
end
if player.leaderstats.Points.Value >= price.Value then
player.leaderstats.Points.Value -= price.Value
player["SlideData"][slideToBuy].Value = true
events.BuySlide:FireClient(player,slideToBuy)
end
end)
Line 18 if player.leaderstats.Points.Value >= price.Value then