Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to fix angle not being changed?*SOLVED*

The Following script is trying to move the angle of a Weld.C0 after it is placed in the body of the character:

Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(Player)
 Player.CharacterAdded:Connect(function(Character)
  print("Sword Added")
  local Character = Player.Character or Player.CharacterAdded:Wait()
  local GrandSword = game:GetService("ReplicatedStorage").GrandSword:Clone()
   GrandSword.Parent = Character

  local Weld = Instance.new("Weld")
   Weld.Parent = GrandSword
   Weld.Part0 = GrandSword.Handle
   Weld.Part1 = Character.Torso
   Weld.C0 = CFrame.new(-3.7, 0, -0.6) * CFrame.Angles(0, math.rad(-44.5), 0)
 end)
end)

But the Angle isnt changed by line 13 i keeps at 0 for some reason

Btw heres the result: http://prntscr.com/qe4cjl

Any help is appreciated :D

4 comments

0

Try modifying the weld.C0

0

It might be the wrong CFrame

0

What do you mean?Isnt the script doing that already?Btw the CFrame in C0 is a varible so i can put any number in there

0

Thats what I mean, try and adjust the C0 more

1 answer

Looks like the problem was in the accessory, as it was an accessory and had a handle the handle had a TouchInterest so it was being welded in the head of my char the moment it was moved to it, all i had to do was switch the accessory for a model and weld all the parts inside of the model handle together.Fixed!

This discussion is preserved as it was. New answers, comments, and votes are closed.