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

Part follows mouse but returns to the camera ??

Asked by 7 years ago
Edited 7 years ago
local Player = game.Players.LocalPlayer
local mouse = Player:GetMouse()
local enabled = true

mouse.KeyDown:connect(function(key)
key = key:lower()
if not enabled then return end
enabled = false
    if key == "j" then
    local mes = script.MeshPart:Clone()
    mes.Parent = workspace
    mes.CanCollide = false
    mes.Anchored = false
    local sha = script.Water:Clone()
    sha.Parent = mes
    local y = Instance.new("BodyVelocity", mes)
    y.maxForce = Vector3.new(math.huge,math.huge,math.huge)
    y.velocity = mes.CFrame.lookVector*0
    for i = 1, 150 do -- here
        mes.CFrame = CFrame.new(mouse.Hit.p)
        wait()
    end
    game.Debris:AddItem(mes,2)
    end
wait(2)
enabled = true
end)

see the for i = 1, 150 do mes.CFrame = CFrame.new(mouse.Hit.p) wait() end how do I make it so it won't go to the camera like I can move the part around but if I leave the mouse in the same place the part comes back to the camera and blocks my view I don't know how to explain it but this is it.... Help please

0
part.Transparency = 1? thehybrid576 294 — 7y
0
But I am using a Mesh so I want people to see that DarkWQlfc 20 — 7y

Answer this question