Hi!
I’m basically wanting a part to not move but also detect touches against anchored parts.
Is there a replacement? Is there scripting needing to be involved?
Any help appreciated!
Hi!
I’m basically wanting a part to not move but also detect touches against anchored parts.
Is there a replacement? Is there scripting needing to be involved?
Any help appreciated!
dont anchored parts detect touches ?
They do but 2 of them detects touches.
Anyways I found a fix by ChatGPT.
game.Workspace.Part:SetNetworkOwner(nil) -- change to your actual part
By doing this it will not move but it’s collision, touching and transparency is still working.
Tweening also works by the way. This only affects Roblox gravity and force physics!
How would I implement this into a script?
Do the parts start as anchored, set their network owner to nil, and them re-anchor them? That’s exactly what I did but the parts never seem to collide.
I’m having issues with it too now.
The collisions seem to work when the part is unanchored… but by then these parts are already touching the floor because of the gravity so the game starts with these parts touching- what? There’s this video showing it happening (had to keep it short so it’s not over 10 MB)
I removed the solution as it did nothing.
Do you need gravity in your game? If not, you can just set it to 0 since it’s what I did. But I have another problem to deal with: Sonic falling in the goddamn floor.
Sorry for the late response. Managed to find a fix. Create a Server- and LocalScript. They basically make the part not move on the Y axis but movable on the X and Z axis. It’s important to have a script on server-side and client-side, else it will create problems for the other (client or server). You can go ahead and remove the NetworkOwner code, I don’t think it’s necessary.
ServerScript:
local tornadoStarter = game.Workspace:FindFirstChild("TornadoStarter")
local Tsunami = game.Workspace.Tsunami
local tUpdate = game.Workspace:FindFirstChild("TornadoStarter")
local tornadoH = game.Workspace.TornadoStarter.Hitbox
local tornadoPar = game.Workspace.TornadoStarter.Particle
local FireTornado = game.Workspace.FireTornado
local tornadoY = game.Workspace.TornadoStarter.Hitbox.Position.Y
local tornadoY2 = game.Workspace.TornadoStarter.Particle.Position.Y
local FireTorY = game.Workspace.FireTornado.Position.Y
local tsuY = game.Workspace.Tsunami.Position.Y
local spouts = game.Workspace.Waterspouts:GetChildren()
game:GetService("RunService").Heartbeat:Connect(function()
local torX = game.Workspace.TornadoStarter.Hitbox.Position.X
local torZ = game.Workspace.TornadoStarter.Hitbox.Position.Z
local tsuX = game.Workspace.Tsunami.Position.X
local tsuZ = game.Workspace.Tsunami.Position.Z
local fireTorX = game.Workspace.FireTornado.Position.X
local fireTorZ = game.Workspace.FireTornado.Position.Z
tornadoH.Position = Vector3.new(torX,tornadoY,torZ)
tornadoPar.Position = tornadoH.Position
if tornadoH.Anchored == false then
tornadoH:SetNetworkOwner(nil)
end
if tornadoPar.Anchored == false then
tornadoPar:SetNetworkOwner(nil)
end
Tsunami.Position = Vector3.new(tsuX,tsuY,tsuZ)
if Tsunami.Anchored == false then
Tsunami:SetNetworkOwner(nil)
end
for _,v in pairs(game.Workspace.ClonedWaterspouts:GetChildren()) do
if v and v:IsA("Part") then
local SpoutX = v.Position.X
local SpoutZ = v.Position.Z
if v.Anchored == false then
v:SetNetworkOwner(nil)
end
v.Position = Vector3.new(SpoutX,113.557,SpoutZ)
end
end
FireTornado.Position = Vector3.new(fireTorX,FireTorY,fireTorZ)
end)
LocalScript:
--wait(2)
local tornadoStarter = game.Workspace:WaitForChild("TornadoStarter")
local spoutsFold = game.Workspace:WaitForChild("ClonedWaterspouts")
local Tsunami = game.Workspace:WaitForChild("Tsunami")
local tornadoH = tornadoStarter:WaitForChild("Hitbox")
local tornadoPar = tornadoStarter:WaitForChild("Particle")
local FireTornado = game.Workspace.FireTornado
local FireTorY = game.Workspace.FireTornado.Position.Y
local tornadoY = game.Workspace.TornadoStarter.Hitbox.Position.Y
local tornadoY2 = game.Workspace.TornadoStarter.Particle.Position.Y
local tsuY = game.Workspace.Tsunami.Position.Y
local spouts = spoutsFold:GetChildren()
game:GetService("RunService").Heartbeat:Connect(function()
local torX = game.Workspace.TornadoStarter.Hitbox.Position.X
local torZ = game.Workspace.TornadoStarter.Hitbox.Position.Z
local tsuX = game.Workspace.Tsunami.Position.X
local tsuZ = game.Workspace.Tsunami.Position.Z
local fireTorX = game.Workspace.FireTornado.Position.X
local fireTorZ = game.Workspace.FireTornado.Position.Z
tornadoH.Position = Vector3.new(torX,tornadoY,torZ)
tornadoPar.Position = tornadoH.Position
Tsunami.Position = Vector3.new(tsuX,tsuY,tsuZ)
for _,v in pairs(game.Workspace.ClonedWaterspouts:GetChildren()) do
if v and v:IsA("Part") then
local SpoutX = v.Position.X
local SpoutZ = v.Position.Z
v.Position = Vector3.new(SpoutX,113.557,SpoutZ)
end
end
FireTornado.Position = Vector3.new(fireTorX,FireTorY,fireTorZ)
end)
Turns out that it works fine, but for some reason destroys the part, even though it’s position is set.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.