This is getting a little aggravating I am trying to make this script work, but it works in studio mode and not in player mode and I don't know why! My output is saying nothing is wrong with the script!
Where they are: --Price and Wait are IntValues in the Potato Script. --Main script is in Soil --Potato script is in Soil
In the chopping the crop down script I have the enable script. Why is this not working :(
script:
local Cash = game.Players.LocalPlayer.leaderstats.Cash local Price = script.Price.Value local carrot = script.Parent.Parent.Carrot local corn = script.Parent.Parent.Corn local wheat = script.Parent.Parent.Wheat local potato = script.Parent.Parent.Potato local pumpkin = script.Parent.Parent.Pumpkin local Let = script.Parent.Parent.Lettuce local On = script.Parent.Parent.Onion local Rice = script.Parent.Parent.Rice local PA = script.Parent.Parent.PotatoA local PB = script.Parent.Parent.PotatoB local PC = script.Parent.Parent.PotatoC potato.Touched:Connect(function(TouchedA) if Cash.Value >= Price then Cash.Value = Cash.Value - Price script.Disabled = true script.Parent.Main.Disabled = true script.Parent.Wheat.Disabled = true script.Parent.Corn.Disabled = true Let.Transparency = 1; On.Transparency = 1; Rice.Transparency = 1; carrot.Transparency = 1; corn.Transparency = 1; wheat.Transparency = 1; potato.Transparency = 1;pumpkin.Transparency = 1 Rice.SurfaceGui.Enabled = false; On.SurfaceGui.Enabled = false; Let.SurfaceGui.Enabled = false; pumpkin.SurfaceGui.Enabled = false; carrot.SurfaceGui.Enabled = false; corn.SurfaceGui.Enabled = false; wheat.SurfaceGui.Enabled = false; potato.SurfaceGui.Enabled = false; wait(1) PA.Transparency = 0 wait(5) PA.Transparency = 1 PB.Transparency = 0 wait(5) PB.Transparency = 1 PC.Transparency = 0 PC.Collect.Disabled = false script.Disabled = true elseif Cash.Value <= Price then script.Parent.Main.Disabled = false script.Parent.Corn.Disabled = false script.Parent.Wheat.Disabled = false PC.Collect.Disabled = true script.Disabled = false Cash.Value = Cash.Value - 0 end end)
Your problem is that you use LocalPlayer well that's the problem... It works only in StudioMode but if you go in Online Mode it wont work....