I’m at loss for words and I haven’t really seen anything as identical before anywhere else. Note that everytime I retry, it sometimes works, and sometimes didn’t. And I do not have a clear reproduction step since it randomly happens.
Breaking script:
The parent of the script is ONE-HUNDRED PERCENT in workspace. FunctionerModule have no say in this since it only makes basic coding easier for me. (e.g. not having to type out Touched:Connect() but instead connect it through :Touch()) and there’s literally nothing in FunctionerModule that contains “FireAClient.” (because all it does is executing the functions passed)
(if you’re curious, hit is the part hit, plr is the player returned, chr is plr’s character, signal is the RBXScriptConnection, and there’s absolutely nothing wrong with them.)
There were also similar cases where the error lies in “FireA,” and I’ve noticed that it’s got a pattern that there’s sometimes a random A next to the word “Fire.”
With the said script only having:
Footage of me desperately rewriting the script: (notice how the asterisk disappears)
Any questions or answers are appreciated. I will attempt to answer them as it is currently well past midnight and I really want to know what’s going on here. (i might be hallucinating who knows)
This is the :Touch() all in its glory inside the FunctionerModule
function f:Touch(part,func,renew,func2,renew2)
if part:IsA("BasePart") then
if func then
if not renew then
local touch
touch = part.Touched:Connect(function(hit)
local plr = game.Players:GetPlayerFromCharacter(hit:FindFirstAncestorOfClass("Model"))
if plr then
touch:Disconnect()
func(hit,plr,plr.Character)
end
end)
else
local touch
touch = part.Touched:Connect(function(hit)
local plr = game.Players:GetPlayerFromCharacter(hit:FindFirstAncestorOfClass("Model"))
if plr then
func(hit,plr,plr.Character,touch)
end
end)
end
else
warn("you forgot a function")
end
if func2 then
if not renew2 then
local te
te = part.TouchEnded:Connect(function(hit)
local plr = game.Players:GetPlayerFromCharacter(hit:FindFirstAncestorOfClass("Model"))
if plr then
te:Disconnect()
func2(hit,plr,plr.Character)
end
end)
else
local te
te = part.TouchEnded:Connect(function(hit)
local plr = game.Players:GetPlayerFromCharacter(hit:FindFirstAncestorOfClass("Model"))
if plr then
func2(hit,plr,plr.Character,te)
end
end)
end
end
else
warn("First argument must be a BasePart.")
end
end
part obviously refers to the part that will be touched, func is the function to execute when touched, renew signalifies if the function can be triggered again and also additionally pass back the RBXScriptConnection for any further :Disconnect(), func2 is the function to execute when touch ended,
and renew2 is the renewing for second function and works the same as the first renew.
FunctionerModule’ve got nothing about Fire, FireA, FireClient, nor FireAClient.
I’ll also provide this image for anyone curious:
(FireA only gets FireAllClients and not the actual FireA.)
(i will rewrite the code dont worry about its terrible appearance)
Pretty sure the Find All / Replace All tab do the same function, yes? I’ve already tried that, please refer to the 4th reply. Also I have TeamCreate on so that might be one of the reasons too. Though I do not plan on disabling it since this script is minor and does not affect the experience entirely although it’s pretty frustrating how this can break and other complexities work just fine.
Usually my main game breaks sometimes saying certain characters are in scripts when they are definitely not. I’ll test in studio and it’ll work fine. In main game, it breaks. The solution to this was to restart my studio and then locate where the glitch was happening. Let me know if this helps
Strangely the bug seems to have disappeared. Its existence is still concerning though. I’ll mark a solution to post as to not mislead anybody that the issue is still occuring. I appreciate all help and hope that roblox will one day NOT overlook this problem, no matter minor it is.