ISSUE HAS BEEN RESOLVED!
Right, well to start off. In one of my previously created games, Proximity Prompt works fine. No problem in that particular game instance. However, when I try using the exact same script with ProximityPrompt in a newer game it doesn’t work.
Here’s the newer game link - New game with Broken Prox
And here’s the old game link - Old game with Working Prox
Example of where the Prox in the New game should be is where the ‘?’ sign is.
Example of Prox in the Old game is under the huge tree with string attached to it on that same side.
I've copied the script over exactly, with everything in the right place. Here's an example of the Explorer tab in the Old game:
And here's the script used in the old game:
Only difference between the 2 scripts (New one further down the page) is the text displayed.
local TweenService = game:GetService("TweenService")
local gui = script.Parent
local CurrentCamera = game.Workspace.CurrentCamera
local Campart = game.Workspace.NPCS.Dummy6.CamPart
local chatline = script.Parent.Frame1.ChatLine
local talksound = script.Parent.TalkSound
local accept1 = script.Parent.Frame1.Accept1
local frame1 = script.Parent.Frame1
local e = game.Workspace.NPCS.Dummy6.Torso.ProximityPrompt
e.Triggered:Connect(function()
chatline.Text = " "
gui.Enabled = true
frame1.Visible = true
accept1.Visible = false
accept1.Active = false
CurrentCamera.CameraType = Enum.CameraType.Scriptable
local TI = TweenInfo.new(1.5,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut, 0)
local Goal = {CFrame = Campart.CFrame}
local Animation = TweenService:Create(CurrentCamera, TI, Goal)
e.MaxActivationDistance = 0
Animation:Play()
script.Parent.Frame1:TweenPosition(UDim2.new(0, 0,0.8, 0),"Out", "Linear", 1.5)
wait(1.6)
talksound:Play()
local text = "This is an old dead tree... Looks like there used to be a swing here."
for i = 1, #text do
chatline.Text = string.sub(text, 1, i)
wait(0.03)
end
talksound:Stop()
accept1.Active = true
accept1.Visible = true
end)
accept1.MouseButton1Click:Connect(function()
accept1.Active = false
accept1.Visible = false
frame1:TweenPosition(UDim2.new(0, 0,1.5, 0),"Out", "Linear", 1)
wait(.5)
CurrentCamera.CameraType = Enum.CameraType.Follow
end)
Here's an example of the Explorer tab in the New game:
... And then the copied script in the New game:
local TweenService = game:GetService("TweenService")
local gui = script.Parent
local CurrentCamera = game.Workspace.CurrentCamera
local Campart = game.Workspace.NPCS.Dummy6.CamPart
local chatline = script.Parent.Frame1.ChatLine
local talksound = script.Parent.TalkSound
local accept1 = script.Parent.Frame1.Accept1
local frame1 = script.Parent.Frame1
local e = game.Workspace.NPCS.Dummy6.Torso.ProximityPrompt
e.Triggered:Connect(function()
chatline.Text = " "
gui.Enabled = true
frame1.Visible = true
accept1.Visible = false
accept1.Active = false
CurrentCamera.CameraType = Enum.CameraType.Scriptable
local TI = TweenInfo.new(1.5,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut, 0)
local Goal = {CFrame = Campart.CFrame}
local Animation = TweenService:Create(CurrentCamera, TI, Goal)
e.MaxActivationDistance = 0
Animation:Play()
script.Parent.Frame1:TweenPosition(UDim2.new(0, 0,0.8, 0),"Out", "Linear", 1.5)
wait(1.6)
talksound:Play()
local text = "... What happened here?"
for i = 1, #text do
chatline.Text = string.sub(text, 1, i)
wait(0.35)
end
talksound:Stop()
accept1.Active = true
accept1.Visible = true
end)
accept1.MouseButton1Click:Connect(function()
accept1.Active = false
accept1.Visible = false
frame1:TweenPosition(UDim2.new(0, 0,1.5, 0),"Out", "Linear", 1)
wait(.5)
CurrentCamera.CameraType = Enum.CameraType.Follow
end)
I’ve looked into the particular settings of the ProximityPrompt itself as well. It’s the same for both games:
Meanwhile I’m going to try more ways to fix this issue. If I find one, I’ll either put it up here as a solution or just delete the post.