Hi I made a script which when a Player other then the carrier touches the part it deals them 30 Damage and sends them flying back whilst rotating, But I don't know how to change the CFrame of a Player can you help me Please?
local WindSphere = script.Parent WindSphere.Touched:connect(function(Brick) local Hum = Brick.Parent:findFirstChild("Humanoid") local Player = game:GetService'Players'.LocalPlayer if (Hum ~= nil)then Hum.Health = Hum.Health - 30 Player.CFrame = 0 -- I know that's how how you do it, so I'm leaving it like that on purpose end end)
You have to change the CFrame of the torso. Since all the limbs are welded to the torso the entire character will move:
local WindSphere = script.Parent WindSphere.Touched:connect(function(Brick) local Hum = Brick.Parent:findFirstChild("Humanoid") local Player = game:GetService'Players'.LocalPlayer if (Hum ~= nil)then Hum.Health = Hum.Health - 30 Player.Character.Torso.CFrame = CFrame.new(1,1,1) end end)