So I have a variable, _G.have. How do I make this global variable appear in my StarterGui code?? Code in starter:
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
mouse.Button2Down:Connect(function()
print(_G.have)
if _G.have == true then
player.Character.Weld:Destroy() --ignore these
_G.have = false
end
end)
It just prints nil, can someone please tell me how to make global variables in starterGui???

3 comments
Thanks! Do you know any way I could transfer it into startergui??
Easiest way is to of course just create a NumberValue / StringValue / ObjectValue or whatever you want from the server side, then the scripts in the client can interact with them, in a read only mode, of course, if the client makes any modifications to it, it will not replicate, if you want it to, you can use a RemoteEvent and a handler.
Alright, I was trying to do that before but t didn't work, I think I just made a simple error. I will try again.