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.
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 ) and this doesnt happen either.
I might ask my modeler to re-make the model im not sure if its really hollow
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