so basically, i was making a game. then i wanted to insert proximityprompts. so literally what i did was make a door script and it worked etc. but when i inserted another part and added a proximity part, with no script in it. it triggered the door script. this is the door script.
scripyt
local ProximityPromptService = game:GetService("ProximityPromptService")
local TS = game:GetService("TweenService")
local door = workspace.leftdoor.Door
local button = script.Parent.Parent.Parent
local moving = workspace.Doorer.Mover
local moving2 = workspace.Righdoor.Door
-- Detect when prompt is triggered
local function onPromptTriggered(promptObject, player)
script.Parent:Destroy()
TS:Create(door, TweenInfo.new(5,Enum.EasingStyle.Sine,Enum.EasingDirection.Out),{Position = Vector3.new(125.623, 22.308, 16.574)}) :Play()
TS:Create(moving, TweenInfo.new(5,Enum.EasingStyle.Sine,Enum.EasingDirection.Out),{Position = Vector3.new(134.273, 14.893, 17.12)}) :Play()
TS:Create(moving2, TweenInfo.new(5,Enum.EasingStyle.Sine,Enum.EasingDirection.Out),{Position = Vector3.new(118.201, 13.874, 23.365)}) :Play()
player:WaitForChild("PlayerGui").Subtitles.Speaking.Text = "This is broken."
player:WaitForChild("PlayerGui").Subtitles.Namer.Text = "You:"
wait(2)
player:WaitForChild("PlayerGui").Subtitles.Speaking.Text = "Oh well, there is no going back now i guess."
player:WaitForChild("PlayerGui").Subtitles.Namer.Text = "You:"
wait(2)
player:WaitForChild("PlayerGui").Subtitles.Speaking.Text = " "
player:WaitForChild("PlayerGui").Subtitles.Namer.Text = " "
end
-- Detect when prompt hold begins
local function onPromptHoldBegan(promptObject, player)
TS:Create(door, TweenInfo.new(5,Enum.EasingStyle.Sine,Enum.EasingDirection.Out),{Position = Vector3.new(125.623, 22.308, 16.574)}) :Play()
TS:Create(moving, TweenInfo.new(5,Enum.EasingStyle.Sine,Enum.EasingDirection.Out),{Position = Vector3.new(134.273, 14.893, 17.12)}) :Play()
TS:Create(moving2, TweenInfo.new(5,Enum.EasingStyle.Sine,Enum.EasingDirection.Out),{Position = Vector3.new(118.201, 13.874, 23.365)}) :Play()
end
-- Detect when prompt hold ends
local function onPromptHoldEnded(promptObject, player)
TS:Create(door, TweenInfo.new(1,Enum.EasingStyle.Bounce,Enum.EasingDirection.Out),{Position = Vector3.new(125.623, 14.058, 16.574)}) :Play()
TS:Create(moving, TweenInfo.new(1,Enum.EasingStyle.Bounce,Enum.EasingDirection.Out),{Position = Vector3.new(133.423, 14.893, 17.12)}) :Play()
TS:Create(moving2, TweenInfo.new(5,Enum.EasingStyle.Cubic,Enum.EasingDirection.Out),{Position = Vector3.new(118.201, 21.814, 23.365)}) :Play()
end
-- Connect prompt events to handling functions
ProximityPromptService.PromptTriggered:Connect(onPromptTriggered)
ProximityPromptService.PromptButtonHoldBegan:Connect(onPromptHoldBegan)
ProximityPromptService.PromptButtonHoldEnded:Connect(onPromptHoldEnded)
soo yeah, its really annoying. can anyone help?

