I made a boomerang ability for a scythe I made. There is a touched event connected to the blade of the scythe. However, whenever I throw it, it sometimes triggers the touched event and sometimes it does not trigger the touched event. The only thing that is in the touched event is just a print statement so I am notified if the touched event even fires up. At certain angles, the touched event refuses to fire. The blade is a union operation so I have already tinkered with collision settings. All of the settings always result in that sometimes random wacky zany moment where it just doesn't trigger the touched event. The ability itself is an animation; a motor6d is the link between my right hand and the scythe's handle. The blade is non-collidable. However, I have tried setting it to CanCollide to see the results. Whenever it landed, it flung me because it is set to CanCollide. The main surprise was the fact that sometimes it just phased through the dummy even though the scythe and the target are set to CanCollide. I even started putting up invisible boxes around the scythe's blade and a box around the dummy but still no luck. I have stressed out so many options that I believe I am going insane...I've been trying to find a solution for about 2 weeks. At this point, ya fellas are the only shot I got left. Here is a clip of the problem (in the clip the scythe blade is non-collidable and has its collision fidelity set to hull): https://www.youtube.com/watch?v=N1m5JH0Q2ww
The script is literally just:
script.Parent.Blade.Touched:Connect(function(bee) print("jesus christ just work") game.ReplicatedStorage.DamageEvent:FireServer(power, bee, ability, currentCD) end
.Touched does not work on local scripts. You need to use .Touched on server scripts. Use:
--//ServerScript script.Parent.Blade.Touched:Connect(function(bee) print("jesus christ just work") game.ReplicatedStorage.DamageEvent:FireClient(power, bee, ability, currentCD) end)
Server scripts already fire the server so you have to use :FireClient() instead of :FireServer()
--//LocalScript game.ReplicatedStorage.DamageEvent.OnClientEvent:Connect(function(AnyArgumentsHere) -- Anything you want to activate here end)
Also when doing functions, make sure you put "end)" and not "end" on line 4 you put end. Just letting you know. Try this and it should work.
if you don't want your script to be client only then do this:
--//ServerScript script.Parent.Blade.Touched:Connect(function(bee) print("jesus christ just work") --Anything you want to activate here end)
Hope this helps :)