Okay. I made a part, put in it some Particle Emitters and a local script. The part is CanCollide = false, Transparency = 1. This is what's in the local script:
01 | script.Parent.Touched:Connect( function (part) |
02 | local huma = part.Parent:FindFirstChild( "Humanoid" ) |
03 | local dbo = false |
04 | local placeone = CFrame.new(- 260 , 1.5 , - 278 ) |
05 |
06 | if huma then |
07 | print ( "humanoid found" ) |
08 | dbo = true |
09 | if dbo = = true then |
10 | huma.Torso.CFrame = placeone |
11 | dbo = false |
12 | end |
13 | end |
14 | end ) |
Can you help me?
You're trying to get the humanoid's torso, which doesn't exist. The torso is a part of the character model, not the humanoid. (in your script the character is equal to "part.Parent")
To fix this, replace huma.Torso.CFrame = placeone
with part.Parent.Torso.CFrame = placeone
.
However, the torso may not exist (might be R15 or a separate reason) so you need to check for it.
01 | script.Parent.Touched:Connect( function (part) |
02 | local huma = part.Parent:FindFirstChild( "Humanoid" ) |
03 | local dbo = false |
04 | local placeone = CFrame.new(- 260 , 1.5 , - 278 ) |
05 | if huma then |
06 | print ( "Humanoid Found" ) |
07 | dbo = true |
08 | if dbo = = true and part.Parent:FindFirstChild( "Torso" ) then -- check for torso |
09 | part.Parent:FindFirstChild( "Torso" ).CFrame = placeone -- if you want this to work with R15 change Torso to LowerTorso |
10 | dbo = false |
11 | end |
12 | end |
13 | end ) |