Why does this happen?

im making a shield move, and for some reason this keeps happening

heres the script i used.

Code
--------------------------------------------
--Variables
local event = game.ReplicatedStorage.KEvents["Move 1"]
local Shield = game.Lighting["Game Assets"]:WaitForChild("Kindness Assets"):WaitForChild("Kindness Shield")
local db = false

local TS = game:GetService("TweenService")


--------------------------------------------
event.OnServerEvent:Connect(function(plr)
	if db == false then
		db = true
		
		local char = plr.Character or plr.CharacterAdded:Wait()
		local clone = Shield:Clone()
		local rootPart = char:WaitForChild("HumanoidRootPart")
		--------------------------------------------
		local goal = {}
		goal.Transparency = 0
		
		local goal2 = {}
		goal2.Transparency = 1
		
		local tween = TS:Create(clone, TweenInfo.new(2) ,goal)
		local tween2 = TS:Create(clone, TweenInfo.new(2), goal2)
		--------------------------------------------
		clone.Parent = game.Workspace
		clone.CFrame = rootPart.CFrame * CFrame.new(0,3,0)
		tween:Play()
		tween.Completed:Wait()
		task.wait(3)
		tween2:Play()
		tween2.Completed:Wait()
		
		clone:Destroy()
		wait(5)
		db = false
	end
end)

Im not sure whats causing this, but im positive it has something to do with this line clone.CFrame = rootPart.CFrame * CFrame.new(0,3,0)

I tried moving the CFrame up (by 3 as shown in the script) but the results were the same. my modeler said that the model was hollow so im not sure what the issue is.

Help is appriechiated, thank you for your time :grinning:

cloned part is anchored? or no

Its anchored, but i dont see how that could be the issue. Let me unacnhor it

EDIT: I anchored it and theres no difference

weird, i have a system where i clone a part to my character and this does not happen
i’ll check for a while and see what is the issue

1 Like

I have a similar system too, i weld the cloned part to the players character (either using welds or motor6Ds, depending on if i wanna animate or not :sweat_smile:) and this doesnt happen either.

I might ask my modeler to re-make the model im not sure if its really hollow

Is the part CanCollide false or CanCollide true

3 Likes

Yeah it might not be fully hollow causing your player to be stuck.

1 Like

You said you wanted to move the CFrame up, right? So shouldn’t it be
rootPart.CFrame + CFrame.new(0,3,0)
A ‘+’ instead of a ‘*’

If you can, turn off CanCollide, but if you need the part of be CanCollide then make sure it is hollow and set the CollisionFidelity to the highest

its on true, but i think if the model was hollow this wouldnt have an effect on it

i only moved the CFrame upwards cause i assumed the model was clipped into the floor which i thought could be the reason why this was happening, but now im positive its because the model isnt hollow :sweat_smile:

Yeah it probably has something to do with the shield.

Try setting anchored to true and cancollide to false

1 Like

Just change the collisions (CanCollide) on the ball you are using for the shield so you don’t get pushed into the baseplate.

hollow meshes don’t normally have accurate collisions. there’s a collision option that allows you to have precise collisions though

1 Like