Hi, I am currently Making a multiplayer feature for my game, but there is a problem.
When i click the button, using a simple MouseButton1Click, it registreres more clicks.
Here is an example:
Server:
game.ReplicatedStorage.Remotes.ExampleRemote.OnServerEvent:Connect(Function(player)
–Varibles
local PlrGui = player.PlayerGui
local MultiplayerHostFrame = PlrGui.Misc.MultiplayerHost
local Temp = game.ReplicatedStorage.Templates.InvitePlayerTemplate
MultiplayerHostFrame.AddPlrs.MouseButton1Click:Connect(function()
print("Clicked")
end)
end)
Client:
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Parent.Parent.Parent.Enabled = false
script.Parent.Parent.Parent.Parent.Parent.Parent.Misc.MultiplayerHost.Visible = true
game.ReplicatedStorage.Remotes.StartMultiplayerLobby:FireServer()
end)
As you can see from the video, the more times i run the script function. The more times the button is being registred as pressed. Do anyone have something i could do to fix this?