I see that some Connect() functions aren’t working in my game. There are no errors. I changed nothing in my scripts that lead to non-functioning Connect()'s.
Is my game too big? I find it relatively small compared to the frontpage games on Roblox.
local BattleEngage = require(game.ReplicatedStorage.BattleModules.BattleEngage)
local RegularEngagePart = script.Parent.Parent.Engages.RegularEngage
local EnemiesLvl = script.Parent.Parent.Engages.EnemiesLvl
BattleEngage.Engaged(RegularEngagePart, EnemiesLvl)
-- ...
function BattleEngage.Engaged(RegularEngagePart, EnemiesLvl)
RegularEngagePart.Touched:Connect(function(hit)
if game.Players:GetPlayerFromCharacter(hit.Parent) then
local pos = RegularEngagePart.Position
RegularEngagePart.Parent.Parent:Destroy()
-- ...
The problem is not on the :connect() rather that .Touched has a decent chance not to fire. Also debounce is a problem I found with touched
Here’s a raycasting hit box module you can look into Raycast Hitbox 4.01: For all your melee needs!
There’s no debounce in my Touch() scripts. And it also seem that my While true dodoesn’t run too (No errors), like never runs. I’m using Touched to play events like teleporting, etc and not for damaging objects (meleeing).
EDIT: My global local functions aren’t working either.
Just from experience, I’ve tried to make a terminal with touched, however found that if you had shiftlock, it wouldn’t fire some of the times. I would suggest other methods, in regards to the debounce I was talking about, I am pretty sure there is a delay between allowing a touch event to fire (might be wrong).