Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Ive succsesfully weilded the spear to my back but how would i make it tilt a little?

Asked by
Tizzel40 243 Moderation Voter
5 years ago
Edited 5 years ago

game.Players.PlayerAdded:Connect(function(plr)

plr.CharacterAdded:Connect(function(char)

local clonespear = game.ServerStorage:WaitForChild("spear"):Clone()

clonespear.CFrame = clonespear.CFrame * CFrame.fromEulerAnglesXYZ(math.rad(50),0,0)

--------clonespear.CFrame = clonespear.CFrame * CFrame.fromEulerAnglesXYZ()

wait(.1)

clonespear.CFrame = clonespear.CFrame

clonespear.Parent = game.Workspace

clonespear.CFrame = char:WaitForChild("UpperTorso").CFrame

local Weld = Instance.new("Weld",clonespear)

Weld.Part0 = clonespear

Weld.Part1 = char:WaitForChild("UpperTorso")--X:D

Weld.C0 = clonespear.CFrame:inverse() + Vector3.new(0,0,-1)

--Weld.C0 =

---

-----Weld.C0 = Weld.C0 + clonespear.CFrame * CFrame.fromEulerAnglesXYZ(0,math.rad(27),0)

Weld.C1 = char:WaitForChild("UpperTorso").CFrame:inverse() -- * CFrame.fromEulerAnglesXYZ(math.rad(50),0,0)---* CFrame.new(8,0,5)

end)

end)

ive tried my script but it doesnt work... :( "CFrame.fromErulerAnglesXYZ()"

0
What do you mean by "a little"? DeceptiveCaster 3761 — 5y
0
meaning i would like the spear to be tillteed to the side by like 27 radients. Tizzel40 243 — 5y
0
math.rad(27)... DeceptiveCaster 3761 — 5y
0
try Weld.C0 = Weld.C0 * CFrame.fromEulerAnglesXYZ(0,math.rad(27),0) after line 23 hellmatic 1523 — 5y
View all comments (3 more)
0
oo okie Tizzel40 243 — 5y
0
nope didnt work... Tizzel40 243 — 5y
0
Weld.C0 = CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(-math.pi/0,0,0) -- Change these Values to the correct angle that suits you. Divistern 127 — 5y

Answer this question