local enabled = true Player = script.Parent.Parent character = Player.CharacterAdded:wait(); mouse = Player:GetMouse() Run = game:GetService("RunService") Head = Player.Character.Head 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.TopSurface = "Smooth" r.BottomSurface = "Smooth" r.CanCollide = false for i = 1,20 do r.Size = Vector3.new(r.Size.X + 1, r.Size.Y + 1, r.Size.Z + 1) wait() end for i = 1,20 do r.Size = Vector3.new(r.Size.X - 1, r.Size.Y - 1, r.Size.Z - 1) end r.Parent = workspace Weld = Instance.new("Weld") Weld.Part0 = r --Weld.C0 = r.CFrame:inverse Weld.Part1 = Head Weld.Parent = character end end mouse.KeyDown:connect(onKeyDown)
Thanks for helping me.
Try:
char = Workspace:findFirstChild(Player.Name) Head= char:findFirstChild("Head")