This may seem really repetitive, but I'm trying my best to have my answer fully, lol. I have a bunch of screenshots to show you, as well as me trying to attempt to use the TextButton.
So what this TextButton is suppose to do is it's suppose to move the Handle around my Body, as if I were dribbling a basketball...
Here is the code:
local plr = script.Parent.Parent.Parent.Parent local tool = script.Parent.Parent.Parent local gui = script.Parent.Parent local button = script.Parent local Debounce = true local Active = false local CoolDown = 0.01 local function Start() tool.rMovement.Disabled=true tool.lMovement.Disabled=true tool.HandValue.Value = 1 tool.GripPos = Vector3.new(0.5, -0.5, -0.3) wait(0.01) tool.GripPos = Vector3.new(0.5, -1, 0) wait(0.01) tool.GripPos = Vector3.new(0.5, -1.5, 0.5) wait(0.01) tool.GripPos = Vector3.new(0.5, -1.5, 1) wait(0.01) tool.GripPos = Vector3.new(0.5, -1.5, 1.5) wait(0.01) tool.GripPos = Vector3.new(0.5, -1, 2) wait(0.01) tool.GripPos = Vector3.new(1, -0.5, 2.5) wait(0.01) tool.GripPos = Vector3.new(1.5, 0, 3) wait(0.01) tool.GripPos = Vector3.new(2, 0.5, 3) wait(0.01) tool.GripPos = Vector3.new(2.5, 1, 3) wait(0.01) tool.GripPos = Vector3.new(3, 1.5, 3) wait(0.01) tool.GripPos = Vector3.new(2.5, 2, 2.5) wait(0.01) tool.GripPos = Vector3.new(2, 2.5, 2) wait(0.01) tool.GripPos = Vector3.new(1.5, 3, 1.5) wait(0.01) tool.GripPos = Vector3.new(1, 3.5, 1) wait(0.01) tool.GripPos = Vector3.new(0.5, 3, 0.5) wait(0.01) tool.GripPos = Vector3.new(0.5, 2.5, 0) wait() tool.lMovement.Disabled=false end tool.Unequipped:connect(function() -- this somehow isn't working either, but everything seems fine to me when I define "tool". tool.rMovement.Disabled=true tool.lMovement.Disabled=true local plr=game.Players:findFirstChild(tool.Parent.Name) if plr and tool.Parent:findFirstChild("Humanoid") then local c=gui:Clone() c:Destroy() end if tool.HandValue.Value==1 then tool.lMovement.Disabled=false else tool.rMovement.Disabled=false end end) button.MouseButton1Down:connect(function() if Debounce then Debounce = false Start() wait(CoolDown) Debounce = true end end) function onKeyPress(actionName, userInputState, inputObject) if userInputState == Enum.UserInputState.Begin then if Active and Debounce then Debounce = false Start() wait(CoolDown) Debounce = true end end end game.ContextActionService:BindAction("keyPress", onKeyPress, false, Enum.KeyCode.G)
Here is the error I get: screenshot
Here are some other screenshots where the Tool is Located, as well as the Gui.
This is a GIF to see that the Function Start() doesn't work.
Here's what the Function is SUPPOSED to do:
Hopefully this is enough information, if it isn't I will be glad to make another question, or codeshare with you guys or something.
Thanks, LukeGabrieI aka EnergyBrickz