#DBD generator approach stuff
1 messages · Page 1 of 1 (latest)
Just a suggestion, have 4 highlighted circles and a prompt on whatever side they're standing on, then make them "work" on the closest circle they're on
** You are now Level 2! **
and yupp it's possible
-- indicate your part & point
local part = workspace.Part
local point = Vector3.new(0, 10, 0)
-- then put ur point into a space rel to the part
local relative = part.CFrame:PointToObjectSpace(point)
-- then adjust the rel position by the part size
local normalized = relative / (part.Size / 2)
-- find the axis that has the most magnitude in it
local absX, absY, absZ = math.abs(normalized.X), math.abs(normalized.Y), math.abs(normalized.Z)
-- now set a variable for the so called "closest face or whatever"
local findClosestFace
if absX > absY and absX > absZ then
findClosestFace = normalizex.X > 0 and Enum.NormalId.Right or Enum.NormalId.Left
elseif absY > absZ then
findClosestFace = normalized.Y > 0 and Enum.NormalId.Top or Enum.NormalId.Bottom
else
findClosestFace = normalized.Z > 0 and Enum.NormalId.Back or Enum.NormalId.Front
end
print(findClosestFace.Name)
also
directory for the script depends
if you want all the players to see or interact with your gen
like for placing objects, damage detection, or any effects
put it into
ServerScript Service > FaceCheckScript ( Script )
or can also be
Workspace > Part > FaceCheck script ( Script )
But if you want it to be entirely visual for a player
like UI indicators or like any local effects
then
StarterPlayer > StarterPLayerScripts > FaceCheckScript ( Local )
Oh thank you so much, also what do u mean by 4 highlighted circles? just 4 circle parts?
I was thinking more of like a beam
lemme show u a ref
Oh
Just to show indication on where the player is going to be
At least that way they don't just get "Teleported" which may cause like deaths
At least that way they know where they're going to be teleported to
Just a recommendation though, since I've died or maybe lost things due to lack of indicators in some roblox games
ill keep that in mind
** You are now Level 20! **