Shop with GUI doesnt work in servers and published places, only works in studio? Help
Asked by
6 years ago Edited 6 years ago
Hello, i just made a shop with gui, got help from youtube. Everything is fine and works in studio, but if i publish the game, then it wont work in game and servers. Only works in studio, does anyone know what could be wrong and what should i do to get it work in servers too? And yes, filteringenabled is enabled.
The gui opens up but the buy button is not working in the server and im not receiving the tools aswell from shop.
Well, just not to make anything confusing, i will just link the shop tutorial video here, i did exactly everything as in video. Also in the description you can find the shop gui to test it out or to see whats wrong.
https://www.youtube.com/watch?v=c8bWOSU7WKw&t=1s
Shop BUY button script, in replicatedstorage i have a folder named tools and inside tools theres the items i sell on store (sword etc..)
01 | local price = script.Parent.Parent.Price |
02 | local tools = game.ReplicatedStorage:WaitForChild( "Tools" ) |
03 | local tool = tools:FindFirstChild(script.Parent.Parent.ItemName.Value) |
04 | local player = script.Parent.Parent.Parent.Parent.Parent.Parent |
06 | script.Parent.MouseButton 1 Click:connect( function () |
07 | if player.leaderstats:FindFirstChild( "Points" ).Value > = price.Value then |
08 | player.leaderstats:FindFirstChild( "Points" ).Value = player.leaderstats:FindFirstChild( "Points" ).Value - price.Value |
09 | local clone = tool:Clone() |
10 | clone.Parent = player.Backpack |
12 | local clone 2 = tool:Clone() |
13 | clone 2. Parent = player.StarterGear |