Fixed Already Thanks!

I Just want to create a script which will do the following task:If proximity prompt is triggered then start writing animation, freeze camera and make focus part. I have done some scripts but It does not work. Anyone knows why? I really appreciate!

local proximityprompt = script.Parent.Parent.Parent.Parent.Part2.Pro
local monitor = script.Parent.Parent.Parent.Parent.Monitor
local screenText = monitor.SurfaceGui.Frame.Display
local text = screenText.Text

proximityprompt.Triggered:Connect(function()
	for i = 0,#text,1 do
		screenText.Text = string.sub(text,1)
		wait(0.01)
		print("Done")
	end
	end)

Second Script (unused at the moment)

local cas = game:GetService("ContextActionService")
local freezeMovement = "freezeMovement"
local remote = game:GetService("ReplicatedStorage").Events.HackRemote
local plr = game:GetService("Players").LocalPlayer
local cam = workspace.CurrentCamera

remote.OnClientEvent:connect(function(on,camType,monitor)
	if on then -- Disable player movement
		cas:BindActionAtPriority(freezeMovement, function() return Enum.ContextActionResult.Sink end,false,Enum.ContextActionPriority.High.Value,unpack(Enum.PlayerActions:GetEnumItems()))
	else -- Enable player movement
		cas:UnbindAction(freezeMovement)
	end
	
	if camType == 1 then -- Lock the camera
		local focus = monitor.Parent.FocusPart2
		local focus2 = monitor.Parent.FocusPart2
		
		cam.CameraType = "Scriptable"
		cam:Interpolate(focus2.CFrame, focus.CFrame, 1)
	elseif camType == 2 then -- Unlock the camera
		cam.CameraType = "Custom"
		cam.CameraSubject = plr.Character.Humanoid
	end
end)

Is the first script a LocalScript or a ServerScript?

I Fixed Already Thanks for helping!

Alright, no problem! Have a great day.

1 Like