Sorry if the title confused you, but I can't think about another title. I am a beginner at scripting. How can I make a script that I'll put inside of a part that player can go through when they have certain tool?
Let me try to explain this a bit in-depth since you said you're new to scripting.
Correct me if I'm wrong, but I'm assuming that you're talking about a script that checks if a player has a certain tool, and if so, sets a part's CanCollide property to false if the player touches it. This is a fairly simple thing to do; but first, you should know that tools are added to the player's character in the Workspace whenever they equip it. Using this, you could make a script that uses the part's Touched event to search if the tool is found inside the player's character (This script assumes that the script is inside the part):
local toolName = "Tool" --The tool's name local part = script.Parent --Your part's directory part.Touched:connect(function(hit) local tool = hit.Parent:FindFirstChild(toolName) --Check for the tool if tool then part.CanCollide = false --Add other things you might want the part to do end end)
However, like I mentioned before, the tool is only added to the player's character when it is equipped, so this script would only work if the player touches the part while he/she has already equipped the tool.
Hope this helped and everything made sense
Im also a beginner but i learned abit, ill try my best ok C: and also you needa put a localscript in startergui and put this script inside it
game.Players.LocalPlayer.Backpack:WaitForChild("Tool") -- write tool name where it says Tool game.Workspace.Part.CanCollide = false -- Write part name where it says part