In general Roblox already has optimized alot of things in the game for you, all you need to do is to build things smart and nothing should be laggy
But I am still interested in optimising. What would you recommend for optimisation?
It really depends what youāre trying to do, give me an example.
Im using Fastcast and it tends to get laggy at times
I use it for caculating fired bullets from a npc with a gun
And im thinking about running fastcast in parralel or someting like that
Think about if you actually need to use FastCast or not, just ordinary raycasting like CS:GO would probably work well and be way more performant + easier to optimize
FastCast calculates many raycasts at once so sure running it in parallel would make it smoother, but again itās not fixing the root issue.
Is it a good practice to only do one raycast if the target is close enough?
I am also aiming for realism because im making the bullets dip down due to gravity
Thatās a pretty good way of doing it, only use FastCast if the distance is far enough.
You can share your resource without trying to put down someone elseās. All that does is make you look inexperienced and rude. Show some more respect for fellow creators that put out free content for the community.
ZonePlus isnāt really slow and spaghetti coded, thatās a pretty big exaggeration. How would you feel if someone picked apart your code here with their own module and made some condescending remark toward yours?
That being said it looks like a fine resource, the other stuff was just unnecessary
Sorry, was really just a way to get people in who are looking for alternatives, I can remove the bad remarks if you want
I mean I didnāt make zoneplus so it doesnāt really bother me, Iām just telling you it makes you look like you have an ego. Part of being a respected creator is being a mature person and respectful to others, not just having good code
Yeahā¦ my bad, it was a bad attempt at clickbait, Iāll remove it.
The SimpleZone post has reached 1k views!!!, thank you for everyone who has used this module, it means alot to me
I donāt see any remarks, I see he must have removed it however I think it is very important to note that ZonePlus has been āabandonedā essentially and has heavy memory leaks, and that a comparison to it would be nice (respectfully).
Donāt know what was said before though, and I agree with not putting down other developers.
I have a problem with the newest versionā¦
local GoalZone1 = ZoneModule.new(GoalZonePart1, {FireMode = "OnEnter"})
local GoalZone2 = ZoneModule.new(GoalZonePart2, {FireMode = "OnEnter"})
GoalZone1:ListenTo("Part", "Entered", function(Part)
if Part.Name == "Ball" then
print("BallEntered")
end
end)
GoalZone2:ListenTo("Part", "Entered", function(Part)
if Part.Name == "Ball" then
print("BallEntered")
end
end)
GoalZone1:BindToHeartbeat()
GoalZone2:BindToHeartbeat()
GoalZone1 and 2 are both basepartsā¦
Im pretty sure Im doing all the methodology correct.
It wont detect it for some reason.
Anything I should change?
Is the ball exiting and entering the Zone quickly?
No. Im moving it using the select tool. It would be fast in real gameplay however
Is the ball unanchored? When I did a test in Studio, for some reason moving unanchored parts in and out of Zones with the Move tool was very unreliable. However, normally it should work.
its anchored. Moving it on the server side.
Script was a serverscript
Hmm, Iāll try replicating the issue and let you know if I have any fixes