[EDITED TITLE] Why isn't this script CFraming the player at all!?
Asked by
7 years ago Edited 7 years ago
I'm trying to teleport the player character to a certain position using CFrame when a player touches an object.
My problem is that the player doesn't CFrame to a postion during online play but in Roblox Studio only, WHY?!
03 | if debounce = = true then return end |
05 | if Item.Parent:FindFirstChild( "Humanoid" ) and game.Players:GetPlayerFromCharacter(Item.Parent) then |
06 | local Explosion = Instance.new( "Explosion" ,script.Parent) |
07 | local Torso = Item.Parent:FindFirstChild( "Torso" ) |
08 | local Humanoid = Item.Parent:FindFirstChild( "Humanoid" ) |
09 | Explosion.BlastPressure = 500 |
10 | Explosion.BlastRadius = 30 |
11 | Explosion.DestroyJointRadiusPercent = 0 |
12 | Explosion.Visible = true |
13 | Explosion.Position = script.Parent.Position |
15 | local Step = game:GetService( 'RunService' ).Stepped:Connect( function () |
16 | Torso.CFrame = script.Parent.CFrame |
17 | Humanoid.WalkSpeed = 5 |
21 | Torso.Anchored = false |
22 | local Refract = Instance.new( "BodyPosition" ,Torso) |
23 | Refract.Position = script.Parent.Position + Vector 3. new( 0 , 30 , 0 ) |
24 | Refract.MaxForce = Vector 3. new( 400000 , 400000 , 400000 ) |
31 | script.Parent.Touched:Connect(Touch) |