local enabled = true Player = script.Parent.Parent character = Player.CharacterAdded:wait(); mouse = Player:GetMouse() Run = game:GetService("RunService") function onKeyDown(key) key = key:lower() if key == "r" then game:GetService("Chat"):Chat(Player.Character.Head, "REN!") r = Instance.new("Part") r.Shape = "Ball" r.Transparency = 0.7 r.BrickColor = BrickColor.new("White") r.CFrame = Player.Character["Torso"] *CFrame.new(0, 0, 0) r.Parent = workspace end end mouse.KeyDown:connect(onKeyDown)
17:15:00.126 - Players.kingalpha1.Backpack.Ren:15: bad argument #1 to '?' (CFrame expected, got userdata)
The line number is off (for whatever reason)
On line 14, you are multiplying a Part
(the Torso) by a CFrame
, which is an error.
Probably you mean to use Player.Character.Torso.CFrame * CFrame.new(0, 0, 0)
There was no reason to use Character["Torso"]
over Character.Torso
.