Hey, I am having issues with funky collisions on the object, is this a possible bug or can anyone redirect me in the right direction.
The issue is that the cube object that Is welded to the character is going through objects that have the can collide property set to true.
I created a collision group with the character and the object in case the problem seems to be the character and the object are colliding with each other causing weird collisions. but obviously, it is not the solution.
TransformEvent.OnServerEvent:Connect(function(plr,prompt)
local Config = plr.Config
local CanTransform = Config.CanTransform
if CanTransform.Value == true then
local Char = plr.Character
local CharHRP = Char.HumanoidRootPart
local Rotation = CharHRP.CFrame - CharHRP.CFrame.Position
local Model = prompt.Parent
if Char:FindFirstChild('Prop') then
Char.Prop:Destroy();
end
local ModelClone = Model:Clone();
ModelClone.Name = 'Prop'
local MainPart = ModelClone.PrimaryPart
MainPart.Anchored = false
MainPart.CanCollide = true
ModelClone.TransformPrompt:Destroy();
local Weld = Instance.new('WeldConstraint')
Weld.Part0 = MainPart
Weld.Part1 = CharHRP
Weld.Parent = MainPart
MainPart.CFrame = Rotation + CFrame.new(CharHRP.Position.X, MainPart.Size.y * 0.5, CharHRP.Position.Z).Position
Main.SetChar(Char, 1)
Main.CreateGroup(Char,ModelClone)
ModelClone.Parent = Char
end
end)
Thanks.
Game Link : Prop-Hunt - Roblox