#troll mess up
1 messages · Page 1 of 1 (latest)
Set the cancollide false in the script
Its like lacking density
show code
ok so i made 2 different ones instead of that one i sent (because that is the fall script) so almost everything works except for the trap is not turning transparent and non collidable like in troll tower games here is both codes
this is the door script twice, also script.Parent.Parent.door doesn't exist
ah ok is there a fix?
add another .Parent
it's looking for door in base not button
here is the other one
so ther must be on or three parents?
3
also both of these scripts can just be one
what you can do is put door under the button folder instead of editing your code
also i recommend looking into modulescripts
ok
i'm also making a tower game, but my approach for the button thing is different from yours
how is yours?
** You are now Level 4! **
it works normal i guess
ok so i did the parent thing but it still aint working?
ok so door is the trap door right? and button is the activation?
yes
one sec
ok?
drag door under the button folder
and use this script
local button = script.Parent
local door = script.Parent.Parent.door
local CanbeTouched = true
local function ActivateTrap()
if CanbeTouched then
CanbeTouched = false
local originalColor = button.Color
button.Color = Color3.new(1,0,0)
door.Transparency = 0.5
door.CanCollide = false
task.wait(3)
door.Transparency = 0
door.CanCollide = true
button.Color = originalColor
task.wait(0.5)
CanbeTouched = true
end
end
button.Touched:Connect(ActivateTrap)
you mean in the folder or not in the folder but like under it?
is this right?
ummm still dont work now the button doesnt work is it a module script?
no the code is for a regular server script under the part Button
just disable button and door for now and use what i gave
is this right?
there is none but still wont work
sorry if im new i still dont know much abt scripting
nvm i fixed it
did you not write this?
that was for when the white block fade and not collide but my friend helped me with it
but i fixed it by adding another parent
did you manage to get it to work
yes
oh nice catch