local player = game.Players.LocalPlayer local currency = player:WaitForChild('leaderstats').Points local amount = 50 local tool = game.ServerStorage:WaitForChild('BlueKatana') local indextext = script.Parent.Text script.Parent.MouseButton1Click:connect(function() if currency.Value >= amount and not player.Backpack:FindFirstChild('BlueKatana') or player.Character:FindFirstChild('BlueKatana') then currency.Value = currency.Value - amount local newtool = tool:Clone() newtool.Parent = player.Backpack else script.Parent.Text = 'Purchase failed!' wait(0.7) script.Parent.Text = indextext end end) script.Parent.MouseEnter:connect(function() script.Parent.Parent.Parent.ProductImage.Image = 'rbxassetid://'..script.ImageValue.Value script.Parent.Parent.Parent.Description.Text = script.DescValue.Value script.Parent.Parent.Parent.ProductTitle.Text = script.TitleValue.Value end) script.Parent.MouseLeave:connect(function() script.Parent.Parent.Parent.ProductImage.Image = 'rbxassetid://' script.Parent.Parent.Parent.Description.Text = '' script.Parent.Parent.Parent.ProductTitle.Text = '' end)
LocalScripts can't access ServerStorage
Your script yields indefinitely at
local tool = game.ServerStorage:WaitForChild('BlueKatana')
The solution is to either move all logic concerning this tool to the server, or to move the tool to ReplicatedStorage.