---code
local Camera = game.Workspace.CurrentCamera
local Ts = game:GetService("TweenService")
local TweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
Camera.CameraType = Enum.CameraType.Scriptable
local Goal = game.Workspace:WaitForChild("ShopCam").CFrame
local Tween = Ts:Create(Camera, TweenInfo, {CFrame = Goal})
wait(3)
game.Workspace.Proxiemty:WaitForChild("ProximityPrompt").Triggered:Connect(function()
Camera.CFrame = game.Workspace.ShopCam.CFrame
Tween:Play()
end)
#i want it to keep da cframe
1 messages · Page 1 of 1 (latest)
Set camera type to scriptable, set it's cframe to the desired initial cframe theb tween it and after everything is done change the camera type back to normal
i did
** You are now Level 2! **
Make it scriptable when the player triggers the prompt
hmm
It looks like you may have a typo, you said "Proxiemty" towards the bottom of the text. If that's not consistent with how you named the object, that would cause the event to not be created, and also probably cause some errors in the console log.
wait nevermind
nevermind im an idiot
workspace:WaitForChild("Proxiemty"):WaitForChild("ProximityPrompt").Triggered:Connect(function()
proxiemty just didnt load
local Ts = game:GetService("TweenService")
local TweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
workspace:WaitForChild("Proxiemty"):WaitForChild("ProximityPrompt").Triggered:Connect(function()
local Goal = workspace:WaitForChild("ShopCam").CFrame
Camera.CameraType = Enum.CameraType.Scriptable
local Tween = Ts:Create(Camera, TweenInfo, {CFrame = Goal})
Tween:Play()
end)```
this is what it should look like
