What do you want to achieve? I want the part that is moved to my mouse to not pass through objects. Any Solutions would suffice, but examples are much better appreciated!
What is the issue? My Part passes through the ground.
What solutions have you tried so far? I’ve tried to apply the object to the mouse filter and it stills does nothing.
Most of the part position are located in the middle of the object. Try making a model with a set part and a object you want. I’ll give you information if you want
Untitled* - Paint 3D (gyazo.com)
Example as a blue part as a debug part
and red part as a object
To fix this. Make it as a group and set a debug part on a mouse position.
(im sorry to hear that you didnt understand but im trying to make it understand as soon as possible )
Okay so now I’ve encountered another problem lol, the object can’t seem to spawn on my Mouse.Hit! Here is the script if you’re interested in helping me with yet another one of my problem lol.
-Local Script
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local Debounce = false
local Limit = 500
local Remote = game.ReplicatedStorage:WaitForChild(“Invisible”)
local CC = game.Lighting.ColorCorrection
local UIS = game:GetService(“UserInputService”)
UIS.InputBegan:Connect(function(Input, IsTyping)
if IsTyping then return end
if Input.KeyCode == Enum.KeyCode.G then
if Debounce == false then
Debounce = true
local distance = (Mouse.Hit.p - Player.Character.HumanoidRootPart.Position).Magnitude
if distance < Limit then
local event = game.ReplicatedStorage:WaitForChild("OtsutsukiPortal")
event:FireServer(Mouse)
wait(3)
Debounce = false
end
end
end
end)
-Server Script
` local otsu = game.ReplicatedStorage.OtsutsukiPortal
local Debounce = false
local portala = game.ReplicatedStorage.Items.Otsutsuki.PortalA:Clone()
local portalb = game.ReplicatedStorage.Items.Otsutsuki.PortalB:Clone()
local workspace = game.Workspace
otsu.OnServerEvent:Connect(function(Player)
local char = Player.Character
if Debounce == false then
Debounce = true
local Mouse = Player:GetMouse()
portala.Parent = workspace
portalb.Parent = workspace
portala.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0,0,-2) * CFrame.Angles(0, math.rad(180), 0)
portalb.Position = Mouse.Hit
end
end) `
Again, I really appreciate your help. I’m fairly new to scripting and you’re a very kind person.
To fix this, you must have a local scripts, remoteevent and a scripts. First, use a get mouse in a localscripts then send a data to a remoteevent by :FireServer() then Recieve a event in a script and use a SetPrimaryPartCFrame on mouse.Hit (mouse.Hit is a cframe and mouse.Hit.P is a vector3)
I am connecting the Local Script to the Server Script by the remote event if you couldn’t tell , I’m just confused on the Lua Code Blocks so everything looks like the same thing after the local script!