Hello! I tried to do something and it is that when interacting more than once with a proximity prompt it opens. But it doesn’t seem to work, but for what I have made mistakes but I don’t know how to fix them help please.
Oh and here is the script i use:
local interactionCount = 5
script.Parent.Touched:Connect(function(otherPart)
interactionCount = interactionCount + 1
end)
script.Parent.ChildAdded:Connect(function(child)
if child.Name == “ProximityPrompt” and child.InteractionCount.Value == 5 then
script.Parent:SetPrimaryPartCFrame(CFrame.new(script.Parent.Position + Vector3.new(0, 5, 0)))
end
end)