So last time I posted about this, I spoke about the GUI Cloning issue. But this time, it's a different part of it. I have a brick that changes the players camera position. Which is here:
wait(0.03) local player = game.Players.LocalPlayer local camera = workspace.CurrentCamera repeat wait(0.03) until player.Character player.Character:Destroy() camera.CameraType = "Scriptable" camera.CoordinateFrame = game.Workspace.CameraFocusPart.CFrame camera.Focus = game.Workspace.CameraFocusPart.CFrame
Now inside the GUI script that clones, I'm trying to make it change the position of the CameraFocus Part to a different position when I click on a location on the map. (So like a zoom in on the location). It doesn't seem to work and returns this error:
"19:34:50 -- Workspace.PlacePoints.arenapoint.Script:10: ')' expected near ',' "
Please help!
local points = game.Workspace.PlacePoints local ui = game.ReplicatedStorage.AINFOUI local newui = ui:Clone() local uisound = game.ReplicatedStorage.AINFOUI.SOUNDS.clicksound local cam = game.Workspace.CameraFocusPart function onClicked(Player) uisound:Play() newui.Parent = Player.PlayerGui game.Workspace.CameraFocusPart.CFrame.new = (189.468, 67.003, 95.912) end script.Parent.ClickDetector.MouseClick:Connect(onClicked)
I believe you are having a problem with setting the CFrame because you are saying CFrame.new =
. What you need to do is:
game.Workspace.CameraFocusPart = CFrame.new(189.468, 67.003, 95.912)
CFrame.new is not a property of CameraFocusPart. I hope this helps and have a great day scripting!