Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I stop anchored parts behaving like un-anchored parts?

I have this tsunami part that is un-anchored with collisions on and works fine. (It is invisible) I have a separate part that is anchored with collisions off and it uses the script below to change its position to match the invisible tsunamis position every time the tsunami moves, except the y co-ordinate is always 24.577. (The tsunami visual part is visible) The problem is the anchored tsunamiVisual part still acts as if it is unanchored and it falls into the void and despawns.

To experience this glitch join this game: https://www.roblox.com/games/2324819039/Disastrous-Parts-Beta

Script:

local tsunami = game.Workspace.Tsunami
local tsunamiVisual = script.Parent

tsunami.Changed:Connect(function()
	local x = tsunami.Position.X
	local z = tsunami.Position.Z
	tsunamiVisual.CFrame = CFrame.new(x, 24.577, z)
end)

9 comments

0

What? Your question is confusing. What is the anchored part for?

0

Which is the visual one?

0

the visual one is the one located in the variable "tsunamiVisual"

0

The anchored part is the tsunami visual part and its purpose is to always be at the location of the invisible tsunami part, but its Y position is always 24.577, unlike the invisible tsunami part

0

So the Y position is not 24.577?

0

then anchor it..............................................

0

it is anchored and the Y position does change from 24.577 for no reason

0

It's being anchored through a script, not a local script right?

0

its anchored from the beginning, and I checked in testing and it is indeed anchored while falling with a script that should stop it from moving to any Y position other than 24.577

1 answer

✓ Accepted answer

Hm, couldn't you try this? It worked for me when i created a button door.

local tsunami = workspace.Tsunami local tsunamiVisual = script.Parent

for i = 1,NumberHere do tsunamiVisual.CFrame = tsunamiVisual.CFrame * CFrame.new(0,1,0) --Will basically move the part. wait() --Required so it doesn't go bonkers. Like for i = 1,20 do print("Hello world!") end It'll just print all 20. end

Oh and make sure to change "NumberHere", i'm sure you will obviously. And the cframe.new part. 0,1,0 makes it go up.

I hope you understand and i hope this works!

This discussion is preserved as it was. New answers, comments, and votes are closed.