I am getting the error: Workspace.SteamG0D.ControlScript:14: attempt to index upvalue 'V' (a nil value)
What I am trying to do is have a script give assign it's parent to the value of an ObjectValue, which does work, and then once that happens, another script (a local script inside the player character) applies actions to the parts inside the ObjectValue's referenced object.
local uis = game:GetService("UserInputService") local player = script.Parent local V = player.Obj.Value --player.Obj is the ObjectValue local light = false uis.InputBegan:Connect(function(Input, IsTyping) if Input.KeyCode == Enum.KeyCode.Y and not IsTyping then if light then print("Y has been pressed OFF") V.Base.BodyForce.Force.Y=0 else print("Y has been pressed ON") V.Base.BodyForce.Force.Y=workspace.Gravity end end end)