Hello developers!
As the title says, I am making a move for a morph (Which the move Is a tool) that summons a hand that currently does nothing besides moving to where the player Is facing, but on contact, grabs the victim and slams them Into the ground, the problem Is that when using the ability the hand always go In the same direction
Script:
local Tool = script.Parent local Troll = Tool.Parent local SANS = Troll.SANS local Debounce = false Tool.Activated:Connect(function(player,mousePos) if not Debounce then Debounce = true Troll.HumanoidRootPart.Anchored = true local SANSAnimation = Troll.Humanoid:FindFirstChild("Animator"):LoadAnimation(SANS) SANSAnimation:Play() wait(0.30) local Hand = Instance.new("Part",game.Workspace) local Mesh = Instance.new("SpecialMesh",Hand) Hand.Position = Troll.Torso.Position Hand.Orientation = Troll.Torso.Orientation Hand.Size = Vector3.new(4, 4, 2) Hand.Anchored = true Hand.CanCollide = false Hand.CastShadow = false Hand.Rotation = Vector3.new(0,0,-180) Mesh.MeshId = "http://www.roblox.com/asset/?id=32054761" for i=0, 20 do Hand.CFrame = Hand.CFrame + (Hand.CFrame.LookVector * 1) wait() end game:GetService("Debris"):AddItem(Hand,0) wait(2) Troll.HumanoidRootPart.Anchored = false Debounce = false end end)
the code here always sets the hand's rotation to (0, 0, -180). setting the rotation is relative to the world so it's always going to face negative Z ("north") but upside down. you need to