Basically the whole issue is that the module will not acknowledge the hitbox as apart of the module so it just stays there and make my character stuck.
What I’m saying is that the error I get is making my Hitbox not get acknowledged as a Region3 part.
Hopefully it’ll be the last issue I gotta deal with before I finish this combat.
The general problem I want to get past the current moment is hopefully being able to make the hitbox get acknowledged as a Region3 part so I’ll be able to move once I finish the hit. Due to me being unable to move after doing the hit atm.
local ServerStorage = game:GetService("ServerStorage")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Debris = game:GetService("Debris")
--\\ Variables //--
local Debounce = false
local Count = 1
local HB = game.ReplicatedStorage.Hitbox
--\\ Modules //--
RR3 = require(game.ServerScriptService.RotatedRegion3)
--\\ Functions //--
script.Parent.OnServerEvent:Connect(function(Player, Action)
local Character = Player.Character
if Action == ("Combat") then
local Hitbox = HB:Clone()
Hitbox.CFrame = Character.PrimaryPart.CFrame * CFrame.new(0,0,-3)
local Weld = Instance.new("WeldConstraint", Character.PrimaryPart)
Weld.Part0 = Hitbox
Weld.Part1 = Character.PrimaryPart
Hitbox.Parent = workspace
RR3:FromPart(Hitbox)
Debris:AddItem(Hitbox, .3)
end
end)
The new combat is looking more like this now. (Script wise)
Hey there.
You haven’t described what exactly the error is, and what your intention is for the end product. Also, we haven’t been given an idea of how the script is setup, or other pieces of information that could possibly cause the error.
Also, assuming you are using EgoMoose’s “Rotated Region3 GJK” module, I think you need to use “.” instead of “:” when calling “RR3.FromPart”. For example:
-- Try to replace the following block of code,
RR3:FromPart(Hitbox)
-- with the given block of code below
RR3.FromPart(Hitbox)
To add onto this when you call the instance method “FromPart” through an instance with use of the colon operator like RR3:FromPart(Hitbox) the object “RR3” is implicitly passed as the first argument to the function. However when you call the module function with the dot operator like RR3.FromPart(Hitbox) this then the object through which the function is called is not implicitly passed as an argument to the function, in this case only the explicitly declared argument “Hitbox” is passed.