RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"proximity prompt only enabled when Dynamite is equipped. aDD COMMENT TO REQUEST"
-- server script local proximityPrompt = script.Parent.ProximityPrompt local dynamiteTool = game.ServerStorage.Dynamite local function onEquipped(player) if player.Character:FindFirstChild(dynamiteTool.Name) then proximityPrompt.Enabled = true else proximityPrompt.Enabled = false end end game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) character.ChildAdded:Connect(function(child) if child:IsA("Tool") then onEquipped(player) end end) character.ChildRemoved:Connect(function(child) if child:IsA("Tool") then proximityPrompt.Enabled = false end end) end) end) -- Make sure to add a ProximityPrompt instance to the part you want to interact with and a Dynamite tool in the ServerStorage