Shop Gui Not Working? Working in Studio Test mode but not in Player! My Shop Gui ONLY works in studio, it displays properly in Player, but the script does not work, here is the main script on the button that alows it to work in studio, this script allows people to buy the weapon Freely,
BTW THIS IS A REGUALR SCRIPT LOCATED INSIDE OF THE BUTTON
script.Parent.Text=tostring(script.Parent.ItemName.Value)..": "..tonumber(script.Parent.Cost.Value).." "..tostring(script.Parent.Currency.Value) script.Parent.MouseButton1Click:connect(function() if script.Parent.Parent.Parent.Parent.Parent.Parent:findFirstChild("leaderstats") then if script.Parent.Parent.Parent.Parent.Parent.Parent.leaderstats[script.Parent.Currency.Value].Value>=tonumber(script.Parent.Cost.Value) then script.Parent.Parent.Parent.Parent.Parent.Parent.leaderstats[script.Parent.Currency.Value].Value=script.Parent.Parent.Parent.Parent.Parent.Parent.leaderstats[script.Parent.Currency.Value].Value-tonumber(script.Parent.Cost.Value) game.Lighting[script.Parent.ItemName.Value]:Clone().Parent=script.Parent.Parent.Parent.Parent.Parent.Parent.Backpack game.Lighting[script.Parent.ItemName.Value]:Clone().Parent=script.Parent.Parent.Parent.Parent.Parent.Parent.StarterGear end end end)
Is this the problem? Should it be a local script? This script also has other string values like Currency,Cost, and Item Name! The weapons that this script gives to you is in Lighting! Help????
When you're editing properties in GUIs, all code should go in a LocalScript. Most times when you're working with the client (GUIs, local parts or particles, etc.) you should use a LocalScript. Otherwise, when working on the server (making parts, moving things, teleporting players), you should use regular scripts. Hope this helps, feel free to ask any follow-up questions if this doesn't work.
That is rather unusual that it is working on Studio but not Player. Usually the other way around... But, yes, I would try what he said.