I'm trying to make breakable windows, partly for my game, partly for a personal scripting challenge. My only problem is that I want to make it so that "Windows" must be touched by a bullet to move. Here's the script I have so far:
game.Workspace.Windows.Touched:Connect(function(Windows) Windows = script.Parent Windows.Position = Vector3.new(-38, 0.5, 57) end)
but, how do I make it so it must be touched by a bullet to break?
Something like this should work if the bullet is called Bullet:
game.Workspace.Windows.Touched:Connect(function(partThatTouched) if partThatTouched.Name == "Bullet" then Windows.CFrame = CFrame.new(-38, 0.5, 57) end end)