I have trouble trying to finish the script, or at least get to where I understand what I'm suppose to do next.
local RepStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local plr = Players.LocalPlayer
local playerGui = plr:WaitForChild("PlayerGui")
local controlGuiClass = RepStorage:WaitForChild("ControlsGui")
tool.Equipped:connect(function()
tool.rMovement.Disabled=true
tool.lMovement.Disabled=true
if plr and tool.Parent:findFirstChild("Humanoid") and not controlGuiClass then
local function newControlGui()
local controlGui = controlGuiClass:Clone() --whenever i test it, it won't be placed in the PlayerGui
controlGui.Parent = playerGui
return controlGui
end
local controlGui = newControlGui()
controlGuiClass:WaitForChild('TextButton').Visible = true --this eventually doesn't show up
if tool.HandValue.Value==1 then
tool.lMovement.Disabled=false
else tool.rMovement.Disabled=false
end
end
end)
I was told using booleans something along the lines of this:
button.MouseButton1Click:connect(function()
frame.Visible = not frame.Visible
end)
Thanks,
LukeGabrieI aka EnergyBrickz
