Hello I was trying to make a PlayGui where when you join it shows you the whole map to see, and if you press Play it will destroy the Gui and move your camera to original state and play around, but my problem is it shows a error which I don't like seeing in the Output box. If someone could help me or just link a Camera thread that would help.
They are all Local Scripts and also heres the Error message prnt.sc/1qogb4y, if you don't trust links heres the message in text:
14:29:53.142 CFrame is not a valid member of Model "Workspace.Templvte" - Studio 14:29:53.142 Stack Begin - Studio 14:29:53.143 Script 'Players.Templvte.PlayerGui.PlayGui.Frame.PlayButton.Play', Line 14 - Studio 14:29:53.143 Stack End - Studio
Here are the script I used to make my Play work:
In the Play Button:
-- Locals:
local Button = script.Parent
local Camera = workspace.Camera
local Player = game.Players.LocalPlayer
Button.MouseButton1Click:Connect(function()
if Player.PlayerGui:FindFirstChild("PlayGui") then
Player.PlayerGui.PlayGui:Destroy()
end
Camera.CameraType = Enum.CameraType.Custom
Camera.CameraSubject = Player.Character
Camera.CFrame = Player.Character.CFrame
Camera.CameraType = Enum.CameraType.Fixed
end)
Don't know if you need how I get into the Camera state but also heres the script:
-- Locals:
local Camera = workspace.Camera
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CameraSubject = workspace.Cameras.SpawnCamera
Camera.CFrame = workspace.Cameras.SpawnCamera.CFrame
If you could improve or just tell me why it makes the error thats fine with me.

4 comments
Which line causes the error?
"'Players.Templvte.PlayerGui.PlayGui.Frame.PlayButton.Play', Line 14 - Studio", "14:29:53.142 CFrame is not a valid member of Model "Workspace.Templvte" -"
Does the script work fine? And also, Roblox is just telling you that it can not find any properties identified as "CFrame" in the model it's trying to look for. Basically, Models do not have a CFrame property. If you're reffering to parts inside the model (which do have a CFrame value), inside the model, then you'll have to add: Model.PrimaryPart or Model.Part
How would I do that inside a script?