robloxapp-20241021-2019316.wmv (1,5 Mo)
Hello, my problem is in video, the raycast does not fit the object into a part
Thanks to everyone helps !
The problem from my understanding is the ray cast is not ignoring a part.
This is a simple fix. You will need raycastParams to fix this
the code should look like this
local RaycastParamiters = RaycastParams.new()
RaycastParamiters.FilterDescendantsInstances = {} -- a table of parts you want it to ignore
RaycastParamiters.FilterType = Enum.RaycastFilterType.Exclude -- This is telling the raycast to ignore the parts
workspace:Raycast(Position, Direction * disntace, RaycastParamiters) -- do your raycast
Hope this helps
Hello, I already have a line doing this, but as long as the part does not have its CanQuery in false, the grab object does not pass inside. Thanks for your help
local _, p, n = workspace:FindPartOnRayWithIgnoreList(ray, {script.Parent, selObj, p.Character, workspace:WaitForChild("IgnoredPart")})
→ The object can pass through the part, but cannot enter inside
→ When CanQuery is false, the button no longer works but the problem is solved (I use Zone+ for the button)
I finally gave up on ZonePlus and created a completely new script, which is much better and much more convenient. Thanks for helping me though!
robloxapp-20241022-1855252.wmv (1,1 Mo)