Door || Script does not work

Hi there,
I’ve been building a game with a few items that have problems

I have made a door added with a ProximityPrompt and then made a RemoteEvent for the ‘typing’ effect and a ModuleScript for the RemoveEvent.
A GUI also goes up and down as well.

I have coded the door but it doesn’t work when I trigger the ProximityPrompt

Here is my code:

local ReplicatedStorage = game:GetService("ReplicatedStorage")

local TypeTextRE = ReplicatedStorage:WaitForChild("TypeText")

local StarterGui = game:GetService("StarterGui")


local Player = game:GetService("Players")

local LPlayer = Player.LocalPlayer

local TextBG = LPlayer.PlayerGui:WaitForChild("NotificationSystem")

local Frame = TextBG:WaitForChild("MainFR")

local Text = Frame:WaitForChild("TextLabel")


function TweenUp()
	Frame:TweenPosition(UDim2.new(TextBG.UDIM2_UP.Value),Enum.EasingDirection.In,Enum.EasingStyle.Back,1.25)
end

function TweenDown()
	Frame:TweenPosition(UDim2.new(TextBG.UDIM2_DN.Value),Enum.EasingDirection.Out,Enum.EasingStyle.Quad,1.1)
end

function Notify()
	script.Parent.MaxActivationDistance = 0
	TweenUp()
	wait(1.4)
	TypeTextRE:FireServer(Text,"Hmmm... Seems like this door is jammed!")
	wait(5)
	TweenDown()
	wait(2)
	Text.Text = ""
	script.Parent.MaxActivationDistance = 10
end

script.Parent.Triggered:Connect(Notify)

I have also made a .rbxm file if you don’t know what I just said
Downloadable here


Could someone help, that would be appreciated.

Any errors in output?

Use a RemoteEvent instead of trying to use just a serverscript.

No errors in output.

There is a RemoteEvent. If you don’t believe me get the file.

I’m have a look at the file now.

Yeh, this won’t work - it’s not really a script you want to be looking at, add print statements and see where you get to - but look adding one space between variables isn’t great as it makes the script a lot bigger then it has to be and in general the script is a bit iffy.

1 Like

i habe and when the proximity prompt is triggered, nothing prints

That’s very very strange, try making a basic script with nothing else inside, just allow it to detect the prox prompt and print something, nothing else - then report back to me.

Try watch this video to get a bit more help!

Hey @Deleted_User5,

Awhile back I created a Proximity Prompt door, and I could give you the model if you want. It doesn’t use anything but scripts and TweenService, so it should function smoothly, and it’s customisable.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.