Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

MouseButton1Up/Click Event is not firing?

I got a problem where my MouseButton1Up Event is not firing. I tried anything and I am not sure why is it not firing.

My code in Local Script children of my Image Button:

local player1Frame = script.Parent.Parent.Player1Offer
local AcceptTrade = game:GetService("ReplicatedStorage").Functions.AcceptedTradeRequest

script.Parent.MouseButton1Up:Connect(function()
	print("CLICKED NOOB!") -- debugging purposes
	local givenPets = {}
	for i, v in pairs(player1Frame.Offer:GetChildren()) do
		if v:IsA("ImageLabel") then
			table.insert(givenPets, v.Name)
		end
	end
	table.foreach(givenPets, print) -- for debugging purposes
	local result = AcceptTrade:InvokeServer(givenPets)
end)

4 comments

0

any error ?

0

put print on first line and tell me if it prints

0

is that the whole script?

0

nevermind, i figured out what's wrong with it ty for your time

1 answer

It happened to me once, try to use mousebutton1down dunno if it will work

This discussion is preserved as it was. New answers, comments, and votes are closed.