of     1   

Richard_RahI
#183900992Thursday, February 18, 2016 9:16 PM GMT

local Range = script.Parent.InRange.Value local Inv1 = game.Players.LocalPlayer.PlayerGui.Inv.One local Inv2 = game.Players.LocalPlayer.PlayerGui.Inv.Two local F1 = Inv1.F.Value local A1 = Inv1.A.Value local T1 = Inv1.T.Value local F2 = Inv2.F.Value local A2 = Inv2.A.Value local T2 = Inv2.T.Value local Sword = game.Workspace.Sword.Name == "Sword" function onKeyPress(inputObject, gameProcessedEvent) Sword = game.Workspace.Sword.Name == "Sword" if Range == true then if inputObject.KeyCode == Enum.KeyCode.E then if Inv1.F == false or Inv1.T == "Sword" then Inv1.F = true Inv1.A = Inv1.A + 1 Inv1.T = "Sword" end end end end game:GetService("UserInputService").InputBegan:connect(onKeyPress)
Richard_RahI
#183901957Thursday, February 18, 2016 9:33 PM GMT

bump
Wolfman11127
#183902330Thursday, February 18, 2016 9:40 PM GMT

Idk I may be wrong about this, but maybe try changing this local Sword = game.Workspace.Sword.Name == "Sword" to just game.Workspace.Sword.Name or if that doesn't work try game.Workspace.Sword again I could be wrong but I think our variable is the problem.
killjoy37
#183902391Thursday, February 18, 2016 9:41 PM GMT

Hard to say for sure, but you have a few things that don't look right to me. First, you define Range at the top, but then proceed to check its value each time onKeyPress is called, even though you never redefine it. Thus, I recommend simply making the if statement say if script.Parent.InRange.Value == true then Second, saying local Sword = game.workspace.Sword.Name == "Sword" will always return 'true' unless Sword doesn't exist in the workspace, in which case your code will error.
Richard_RahI
#183912035Friday, February 19, 2016 12:10 AM GMT

No luck :( Removed "Sword" Variable because I didnt need it anymore. Still not doing a thing or giving any error messages.
Richard_RahI
#183913349Friday, February 19, 2016 12:30 AM GMT

halp
[rfa#hidefromsearch]
#183913598Friday, February 19, 2016 12:34 AM GMT

[rfa#hidefromsearch]
Richard_RahI
#183913743Friday, February 19, 2016 12:37 AM GMT

tried both
[rfa#hidefromsearch]
#183913849Friday, February 19, 2016 12:38 AM GMT

[rfa#hidefromsearch]
Richard_RahI
#183914035Friday, February 19, 2016 12:41 AM GMT

yes, another script makes it true as the player is touching the item
cofunction
#183914200Friday, February 19, 2016 12:43 AM GMT

"local Range = script.Parent.InRange.Value" You've defined the value at the top of the script therefore making every time you compare it being the same value. It will NEVER change. So if you want to adjust it too "true" it will still compare it as 'false'. Unless you want this to happen.
Richard_RahI
#183914463Friday, February 19, 2016 12:47 AM GMT

I want it to be false unless the player is touching it which would make it true.

    of     1