If you have seen my last post , you may know I’m working on a piggy game
You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? An invisible door that when you use the correct key on it , it will become uncollidable
What is the issue? I do not know how to make this kind of thing
What solutions have you tried so far? I tried looking for tutorials on youtube and the forum , neither worked
So here’s the plan :
I already have my own tap to open door
I want to make a locked door that is invisible
I also want to make a lock
If I use the correct key , the invisible door would become uncollidable , the lock will fall on the floor
You still need to click the actual door after using the key
I still have tons to learn about scripting! No need to tell me the whole script though , if you want , that’s fine! I just need to know how the using tool to make door uncollide thing and also the lock becoming unanchored
Ok, I don’t actually know how to script but I’m good with the logic of it so I could possible be wrong but I think you should write it like this:
When the player joins the game, set the door to collisions on, put the lock in place, and anchor the lock
If the key is in the player's inventory, then when the door is clicked set the door to collisions off and set the lock to unanchored
End
All I know in actual code is that you need to put those “local get wordspace.door” and things like that at the start. I hope this could help.
script.Parent.MouseClick:Connect(function(plr)
local Tool = plr:WaitForChild("Backpack").Key or plr.Character:WaitForChild("Key")
if Tool then
--Script
else
--Script
end
end)
The file that Sealiteq provided is a model file (.rbxm), not a place file (.rbxl). In studio, right click workspace and click insert from file, then go from there.
Alternatively, here is a place that has Sealiteq’s model included:
So what happens if I download it and I don’t have drive? Because when I downloaded it on my phone , it directed me to drive , then I clicked on it , but for some reason it lead me to Flipaclip?