How do I make this script local player so that others cant go through when someone buys it and that the purchase stays forever? Here is the script : What do I add or delete
local required_points = 2000 local db = true script.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player.leaderstats.Coins.Value >= required_points then if db then db = false script.Parent.Transparency = 0.5 script.Parent.CanCollide = false wait (3) script.Parent.CanCollide = true script.Parent.Transparency = 0 db = true script.Parent.CanCollide = true player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - 2000 end else player.Character.Humanoid.Health = 0 end end end)