I thought that you should modify the off touched function, maybe if you use a different programming in the conditionals you will solve the problem
I think I have to fix the bomb because the game probably thinks when the ball is dropped from my inventory that I have stopped touch the capture zone
I don’t think that’s the problem, because if the feet keep touching the part there is no reason for the event to be deactivated.
It like cancels the player from gaining it because even after the bomb exploded it still stays at zero
I made sort of a extra checking system in the local script so that if the plr is touching it but the capturing == 0 then it changes it to = 1
It didn’t work but Imma try to fix it
Should I use touchended or stoppedtouching
I don’t know what to do……………….
I think this can work
--put IsBomb variable inside the bomb
function offTouch(hit)
local user = game.Players:GetPlayerFromCharacter(hit.Parent)
if user ~= nil and not hit:FindFirstChild("IsBomb") then
user.leaderstats.Capturing.Value = 0
elseif user == nil then
print("its nil")
end
end
I think the problem is that when the bomb drops it is part of the player’s character. So the solution is to simply place bomb inside workspace instead of character. I can give you more detailed solution if you will provide bomb’s code.
Guys I just fixed it myself so imma just put my solution If anyone else needs it
first
remove the offtouch function and just make it to when the part is touched captruing = 1
second make a box around the area where each part is atleast 2 studs thick and make it so when those parts are touched the capturing value = 0
thirdly in the capture part put a wait(0.1) the line after the line that makes the capturing 1 and just make another line that makes the capturing value 1
just to prevent bugs
and thats it
THX To Everyone who helped with my problem
Credit to : DeodorantSlice37, noobstickerman, Devloperblox, and GlugPlayer
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.