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)
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)
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.
3 comments
Give more information. Include the BindableEvent define script.
I'm just following a youtube video and have no idea that that is.
oh my god please dont just ask "fix this tutoyrial!@QIE)I@!!QWd