Hello, I am making a script that will fire a RemoteEvent when clicked. However, the remote event is not being fired as the script on the other end is not doing what it is supposed to do. I put a print command in the function, and it is not showing up in the console. The script is a LocalScript and is in the StarterGui.
The script:
game.StarterGui.Main.SelectWeapon.AK47.MouseButton1Click:connect(function() --AK47 print("Button Clicked") selectionEvent:FireServer(player, "Primary", 1) end)
The GUIs are in the PlayerGui, not the StarterGui. The StarterGui is what gets replicated to each player.
Put this inside the TextButton
script.Parent.MouseButton1Click:Connect(function() --AK47 print("Button Clicked") selectionEvent:FireServer(player, "Primary", 1) end)