So I’m trying to get a basketball to count points on leaderboard when it passes through the net (which just hits an invisible part inside to count), but I’m not sure how to write the script to get it to work. I want there to be a specific number of points awarded for each type of ball, so I figured that the script should go into the tool similar to how a simulator would work, but I’m not sure how to fire the remote event to get it to add points when it passes through the net.
(I’m aware the script probably isn’t written correctly, I know nothing about scripting and was just messing with the script)
script.Parent:FindFirstChild("Handle").Touched:Connect(function(hit)
if hit.Workspace.Court.Half_1.GoalHome == true then -- we make sure it's not a player tocuhed
if hit ~= true then
game.Workspace.MainEvent.AddPoints:FireServer()
script.Parent.Enabled = false
wait(.25)
script.Parent.Enabled = true
end
end
end)