Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Just wondering why my mouse.Target script is not pulling up my GUI?

Asked by 3 years ago
01local UIS = game:GetService("UserInputService")
02 
03local forageKey = "F"
04local eatKey = "E"
05 
06local player = game.Players.LocalPlayer
07local mouse = player:GetMouse()
08 
09local PlayerGui = player:WaitForChild("PlayerGui")
10local ForageInfoGui = PlayerGui:WaitForChild("ForageInfoGui")
11local Foragenoed = PlayerGui:WaitForChild("Foragenoed")
12 
13UIS.InputChanged:Connect(function(input)
14    if mouse.Target then
15        if mouse.Target:FindFirstChild("Edible") then
View all 41 lines...

When the item has a bool value called "Forage" it does not work. However, when the item has a bool value called "Edible" it works. Both bool values are enabled and both GUI's are disabled.

Answer this question