Why does this script not continue on from line 7 when fired from a remote event?
Server Script: (the one where it stops at line 7)
01 | game.ReplicatedStorage.IceFire.OnServerEvent:Connect( function (plr) |
02 | local icering = game.ReplicatedStorage.IceRing:Clone() |
04 | icering:SetPrimaryPartCFrame(plr.Character.HumanoidRootPart.CFrame) |
06 | icering.Parent = workspace |
07 | plr.Character.HumanoidRootPart.CFrame = icering.PlayerTp.CFrame |
10 | plr.Character.LowerTorso.Anchored = true |
15 | icering.Sound.Playing = true |
17 | local Info = TweenInfo.new( 3 ,Enum.EasingStyle.Cubic,Enum.EasingDirection.Out, 0 , false , 0 ) |
19 | local Goals = { Size = Vector 3. new( 50 , 50 , 50 ) } |
21 | for i, v in pairs (workspace.IceRing:GetDescendants()) do |
23 | if v:IsA( "BasePart" ) then |
24 | v.Touched:Connect( function (touch) |
25 | if touch.Parent:FindFirstChild( "Humanoid" ) then |
27 | touch.Parent.Humanoid.Health - = 100 |
32 | local tween = game:GetService( "TweenService" ):Create(v,Info,Goals) |
35 | tween.Completed:Connect( function () |
36 | plr.Character.LowerTorso.Anchored = false |
Local Script: (Fires a remote to the server when a player presses "E")
01 | local inputservice = game:GetService( "UserInputService" ) |
04 | inputservice.InputBegan:Connect( function (input, isTyping) |
06 | if input.KeyCode = = Enum.KeyCode.E then |
08 | game.ReplicatedStorage.IceFire:FireServer() |