So I made a shop using a GUI. This works when I play in edit mode but when I play on an actual server it doesn't put the Cheezburger into my inventory. I've tried changing the Variable Tool to game.ServerStorage:WaitForChild('Cheezburger') but it didn't work. Any suggestions would be awesome. This is in a local script inside a image button.
local Player = game.Players.LocalPlayer local Points = Player:WaitForChild('leaderstats').Points local Tool = game.ServerStorage:FindFirstChild('Cheezburger') script.Parent.MouseButton1Down:connect(function() if Points.Value >= 45 and not Player.Backpack:FindFirstChild('Cheezburger') or Player.Character:FindFirstChild('Cheezburger') then local NewTool = Tool:Clone() NewTool.Parent = Player.StarterGear local NewTool = Tool:Clone() NewTool.Parent = Player.Backpack end end)
LocalScripts can't see things in ServerStorage
Consider moving it to ReplicatedStorage, or even better consider moving your logic to the server and using a RemoteEvent to tell the server to do it.