I have a question for anybody who is viewing this
How do I make a script to make something happen when I walk in a certain area like in a horror game? I couldn’t find a tutorial on youtube so I thought this would be the best place.
How do I make a script to make something happen when I walk in a certain area like in a horror game? I couldn’t find a tutorial on youtube so I thought this would be the best place.
You should try Vector3 | Documentation - Roblox Creator Hub
Edit here example:
function test()
if (workspace.Part1.Position-workspace.Part2.Position).Magnitude <= 1 then
print("Test")
end
end
while wait() do
test()
end
Thank you! (30 charssssssssssss)
Since it’s a certain area, I think Region3 would be a lot more efficient, so its instead in an enclosed area. Magnitude works a lot weirder imo
I’ll try both to see which one is better.
Honestly it depends on personal preference, though Region3 is specifically used for this. If you think Magnitude is more efficient, use DistanceFromCharacter instead of Magnitude.