I have a skeleton that supposed to latch on to the players torso when its activated but it keeps teleporting the player to the skeleton despite it being unanchored.Even tho it teleports the player to it the player can still move freely with it.
COMMUNITY QUESTION
Why does the player keep getting teleported to the part?
1 answer
local ReplicatedStorage = script.Parent
local FormEvent = ReplicatedStorage:WaitForChild("Amaterasu")
local DeactivateEvent = ReplicatedStorage:WaitForChild("Stop")
local user = script.Parent.Parent.Parent
local mouse = user:GetMouse()
local using = false
local function FormEventFired()
using = true
game:GetService("Chat"):Chat(user.Character.Head, "Susano..")
local blood = Instance.new("Decal")
blood.Face = "Front"
blood.Name = "SauceBlood"
blood.Texture = "rbxassetid://979714899"
blood.Parent = user.Character.Head
user.Character.Humanoid.Health = user.Character.Humanoid.Health - 5
game.Debris:AddItem(user.Character.Head.SauceBlood, 5)
script.Deplete.Value = true
local g = script.Parent.Chest:clone()
g.Parent = user.Character
local C = g:GetChildren()
for i=1, #C do
if C[i].className == "UnionOperation" then
local W = Instance.new("Weld")
W.Part0 = g.Middle
W.Part1 = C[i]
local CJ = CFrame.new(g.Middle.Position)
local C0 = g.Middle.CFrame:inverse()*CJ
local C1 = C[i].CFrame:inverse()*CJ
W.C0 = C0
W.C1 = C1
W.Parent = g.Middle
end
local Y = Instance.new("Weld")
Y.Part0 = user.Character.Torso
Y.Part1 = g.Middle
Y.C0 = CFrame.new(0,0,0)
Y.Parent = Y.Part0
end
while using do
wait(0.2)
user.Character.Humanoid.Health = user.Character.Humanoid.Health + 0
end
end
local function DeactivateEventFired()
using = false
user.Character.Chest:Destroy()
script.Deplete.Value = false
local addon = user.stats.Level.Value * 2
end
FormEvent.OnServerEvent:Connect(FormEventFired)
script.Parent.Parent.MS.DeactivateEvent.OnServerEvent:connect(DeactivateEventFired)
DeactivateEvent.OnServerEvent:Connect(DeactivateEventFired)
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
did u write the script urself?
Yes but I use the same script for another item which is just a ribcage and it works perfectly fine
can u maybe upload the script so i can see whats wrong?
Ill upload it in the answer under