Yes thats what i mean, and my question was if you want your model while moving to change it y position, like if you put it on top of another part that is higher than the ground part, it goes up, so?
Cause I forgot in the game the salt can’t go up it stays on ground
In that case, try this:
game.Parent.Parent.Activated:Connect(function()
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local y = 5
local function move()
if mouse.Hit ~= game.Workspace.Salty then
game.Workspace.Salty:MoveTo(Vector3.new(mouse.Hit.Position.X, y, mouse.Hit.Position.Z))
end
end
move()
mouse.Move:Connect(function()
move()
end)
end)
Mouse.Hit
is already a CFrame value. Do:
Salty:PivotTo(CFrame.new(mouse.Hit.Position))
It works but its a little buggy like my mouse is somewhere but the salt is not the red in this image is where my mouse is
I don’t know why but when I take a screen shot it removes my mouse
Try this as he said, it might work tho
Tried it the salt zooms to the camera
I will tell u if i find something
Wait, cant you just use DragDetector?
Try this:
game.Parent.Parent.Activated:Connect(function()
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local function move()
if mouse.Target ~= game.Workspace.Salty then
game.Workspace.Salty:MoveTo(mouse.Hit)
end
end
move()
mouse.Move:Connect(function()
move()
end)
end)
Drag detectors are used verry weirdly and also changes the rotation.
For that before selection you can do:
mouse.TargetFilter = Salty
and after you have moves you can set it to nil.
The salt zooms to the camera when you move it around
My bad, this?:
game.Parent.Parent.Activated:Connect(function()
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local function move()
if mouse.Target.Parent ~= game.Workspace.Salty then
game.Workspace.Salty:MoveTo(mouse.Hit)
end
end
move()
mouse.Move:Connect(function()
move()
end)
end)
It works Tysm!!!
Your more than welcome!
Plus your my first ever post i join and fix!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.