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

What's wrong with this weld script?

Asked by 9 years ago
repeat wait() until game.Players.LocalPlayer
repeat wait() until game.Players.LocalPlayer.Character
repeat wait() until game.Players.LocalPlayer:GetMouse()
repeat wait() until game.Workspace.CurrentCamera


local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local Character = Player.Character
local Camera = game.Workspace.CurrentCamera
local Torso = Character.Torso
local Neck = Torso.Neck


Neck.C1 = CFrame.new()

local gunmodel = game.Lighting.Assault:Clone()
gunmodel.Parent = Camera
local gun = gunmodel.Handle
local gunweld = Instance.new("Weld", gun) 
gunweld.Part0 = Character.Head
gunweld.Part1 = gun


Player.CameraMode = "LockFirstPerson"

I'm trying to weld a gun model to player and when the player looks the gun points there too.

Answer this question