Text Button in Billboard Gui not working?
Im making a game and I want the users to walk up to characters end a billboard gui will appear telling them to press E. However I want to make this functional with touch but for some reason it's not registering the touch. Here is the code below
01 | for _,npc in pairs (NPCS:GetChildren()) do |
02 | npc.UpperTorso.EToGift.Frame.TextButton.MouseButton 1 Click:Connect( function () |
03 | if Player.Character and Player.Character:FindFirstChild( "HumanoidRootPart" ) then |
04 | for _, npc in pairs (NPCS:GetChildren()) do |
05 | if (npc.HumanoidRootPart.Position - Player.Character.HumanoidRootPart.Position).magnitude < 15 then |
06 | if npc.Enabled.Value and Player.OtherInfo.Backpack.Value > 0 then |
07 | game.Workspace.Events.DisableNPC:FireServer(npc) |