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

Connect is not a valid member of BindableEvent?

script.Parent.Touched:connect(function(hit)

if hit.Parent:FindFirstChild("Humanoid") then
	local player = game.Players:GetPlayerFromCharacter(hit.Parent)

	game.ReplicatedStorage.BindableEvents.Sell:Fire(player)
end

end)

3 comments

0

Give more information. Include the BindableEvent define script.

0

I'm just following a youtube video and have no idea that that is.

0

oh my god please dont just ask "fix this tutoyrial!@QIE)I@!!QWd

1 answer

The issue is not inside of the script that you provided.

Make sure that inside of your other script where you're receiving this event, it looks like this:

game.ReplicatedStorage.BindableEvents.Sell.Event:Connect(function(player)
	-- Code
end)

The issue would be that you forgot the .Event.

Also, make sure to capitalise the 'C' in Connect, as lowercase connect is deprecated.

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