-
What do you want to achieve? Keep it simple and clear!
I am trying to make a module script clone a part, put it into a model, and make the part the same size as the model. -
What is the issue? Include screenshots / videos if possible!
There are no errors in the output but whenever I run the game, parts being inserted which are coded to be the same size as the model appear larger than the model. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I searched the DevForums and I have found no solutions.
Server script inside the model:
local MOD = require(game.ServerScriptService.MainScripts.Modules.HouseManagement.HitboxManager)
MOD.Addbox(script.Parent) -- the parent is always a model
Module script the server script is requiring:
local module = {
Addbox = function(house)
local block = game.ReplicatedStorage.HouseSystem.Assets.Hitboxes.HouseHitbox:Clone() -- block is a part
block.Parent = house
block.Size = house:GetModelSize()
block.CFrame = house:GetPivot()
end,
}
return module
I have multiple scripts running the module at the same time when the game starts. It seems the more scripts I add (for a different model each), the larger the hitbox gets. (One model has a perfect sized one, a few have double size, and the others are larger)
Model sizes:
Size of the parts being added:
Help is appreciated!