#Building Detection Bug ~Not Solved

1 messages · Page 1 of 1 (latest)

desert violet
#

the build doesn't detect the platform under it until a few seconds later and it detects it fine if its under it

real eagle
#

mind if i see the code?

desert violet
real eagle
#

is this the full code?

desert violet
#

its the part with the bug

#

before it is just snaping to other builds logic

real eagle
#

alright

barren whaleBOT
#

studio** You are now Level 8! **studio

real eagle
#

w

#

just add the else on top

desert violet
real eagle
#

what you want it to be?

desert violet
real eagle
desert violet
#

the problem isn't involved with the rest of the code

barren whaleBOT
#

studio** You are now Level 13! **studio

desert violet
#

Building Detection Bug ~Not Solved

vagrant quarry
#

SetBuildDefualtCFrame Defualt derp

vagrant quarry
#

one such example is you have some yield before setting attributes if shapeCastDown ~= nil and shapeCastDown.Instance.Parent:GetAttribute("Platform") or shapeCastUp ~= nil and shapeCastUp.Instance.Parent:GetAttribute("Platform") then

desert violet
desert violet
vagrant quarry
#

add prints

#

check attributes

#

etc

desert violet
#

did a quick test and the shapecastdown hits the platform

vagrant quarry
desert violet
#

if shapeCastDown ~= nil and shapeCastDown.Instance.Parent:GetAttribute("Platform") or shapeCastUp ~= nil and shapeCastUp.Instance.Parent:GetAttribute("Platform") then
--cant build since we are hiting a platform
print("hitting platform")
canBuild = false
BuildColor(false)
SetBuildDefaultCFrame()
elseif BuildType == "Foundation" then
--we can build since we are not hitting a platform but we are hitting something
testPart.Position = shapeCastDown.Position <-------
print("hiting ground")
BuildColor(true)
canBuild = true
SetBuildDefaultCFrame()
else

in this part

vagrant quarry
#

i meant this is what debugging is

#

keep going

vagrant quarry
#

that's debugging

desert violet
#

also quick question, with creating lots of npcs should i just do that on the server or the client