okay so i made this sell script but it wont work i used the print to detect the error but it still wont work can some one help me?
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RemoteEvents = ReplicatedStorage.RemoteEvents local Sold = RemoteEvents.ItemSold local Debounce = false script.Parent.Touched:Connect(function(hit) print("Player Touched Part") if hit.Parent:FindFirstChild("Humanoid") then local Player = game.Players:GetPlayerFromCharacter(hit.Parent) if Player.PlayerStats.CurrentValue.Value > 0 then if Debounce == false then Debounce = true Sold:FireClient(Player, Player.PlayerStats.CurrentValue.Value) Player.PlayerStats.Coins.Value = Player.PlayerStats.Coins.Value + Player.PlayerStats.CurrentValue.Value Player.PlayerStats.CurrentValue.Value = 0 wait() Debounce = false end end end end)