I have a tool that is supposed to spawn a model at a player’s torso, everything works except that the model doesn’t move to the player’s torso.
local thing = game.ReplicatedStorage.Traps.SpikeTrapModel
local event = script.Parent.Plave
event.OnServerEvent:Connect(function(player)
local clone = thing:Clone()
local pos = player.Character.Torso.Position
clone:MoveTo(pos)
clone.Parent = workspace
script.Parent:Destroy()
end)
This serverscript is located inside the tool
Can try with the PivotTo method (takes a CFrame). What’s a “Plave”? XD
local thing = game.ReplicatedStorage.Traps.SpikeTrapModel
local event = script.Parent.Plave
event.OnServerEvent:Connect(function(player)
local clone = thing:Clone()
--local pos = player.Character.Torso.Position
local cf = player.Character.Torso.CFrame
clone:PivotTo(cf) -- changed to PivotTo
clone.Parent = workspace
script.Parent:Destroy()
end)
1 Like
Ok it seems to work. And uh ye a plave was a spelling error by me when making a value. It was supposed to be place lol.
1 Like