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

Holding script won't work?

Asked by 9 years ago

Making a horror game, tried making a script to make you hold items like you are holding a box in Amnesia. (Take a look)

script.Parent.MouseClick:connect(function(player)
    local Mouse = player:GetMouse()
    script.Parent.Parent.Parent = player.Character
    while true do
    wait()
        script.Parent.Parent.CFrame = CFrame.new(Mouse.Hit.X,Mouse.Hit.Y,Mouse.Hit.Z)
    end
end)

When you see it, it looks like this: http://imgur.com/S1tYHgP

When you click it, it twitches a lot and looks like this: http://imgur.com/EyLWDFV

Can anyone help me with this?

Answer this question