Hello, So I got a script that’s not working I have checked the output and it comes up with no errors.
What I need it to do is that when a “ProximityPrompt” is trigged move the players camera to a part and not let them go 360* around the part with there camera.
All I need at the moment is that when the player triggers it there camera is moved if you could help me with my other problem then many thanks.
Insert a normal Script inside of the part with the ProximityPrompt.
local trigger = script.Parent.ProximityPrompt
local Camera = workspace.CurrentCamera
local Player = game.Players.LocalPlayer
local event = game.ReplicatedStorage.RemoteEvent
trigger.Triggered:Connect(function(plr)
event:FireClient(plr)
end)
make a RemoteEvent in ReplicatedStorage
Insert a LocalScript in StarterGui
local Camera = workspace.CurrentCamera
local Player = game.Players.LocalPlayer
local event = game.ReplicatedStorage.RemoteEvent
event.OnClientEvent:Connect(function(plr)
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CFrame = workspace.CameraPrt1.CFrame
end)