I am making a tool that when held will cause a gui to appear in the lower right hand corner of the screen (by default, enabled is set to false). I am trying to use a local script to accomplish this, but I can't seem to get it to work. The script I have right now is down below.
Locations: The tool is a child of ServerStorage so that it can be pulled out using Adonis Admin commands. The script is a child of the tool, named "bait." The gui is located in StarterGui.
local player = game.Players.LocalPlayer
local tool = player.Character.bait -- The tool is named "bait"
if tool then
player.PlayerGui.BaitLengthGui.Enabled = true
end

1 comment
Thank you! It didn't work at first but I realized that I needed to change "local tool = player.Character.bait" to "local tool = player.Character:WaitForChild("bait")" because the tool starts in the backpack. Thanks for your help!