local rooms = game.Workspace.Rooms

local camera = rooms.Camera1

local cam = game.Workspace.CurrentCamera

local Button = script.Parent

Button.MouseButton1Click:connect(function()
if game.Players.LocalPlayer:WaitForChild("ChangeTheCam") then
cam.CameraSubject = camera
cam.CameraType = "Scriptable"
cam.CoordinateFrame = CFrame.new(camera.Postion,CFrame.new(20,20,20)) -- Using Camera1 will most certainly throw the script off.
game.ReplicatedStorage["CreateAToonGui"]:Clone().Parent = game.Players.LocalPlayer.PlayerGui
end
end)

server script is

game.Players.PlayerAdded:connect(function(p)
	p:WaitForDataReady()
	if p:LoadInstance("Toon3") == nil then
	local event = Instance.new("RemoteEvent")
	event.Parent = p
	event.Name = "ChangeTheCam"
    wait(2)
	event:FireClient(p)
	end
	end)

What should happens is that when the server event "ChangeTheCam" is found in the player then this local script should just change the camera etc. But its not work at all. Any help?

1 comment

0

You don't have a listener for the event at all on the client in the code you provided. If you'd like to know how to do this, I've explained it all in this video: https://www.youtube.com/watch?v=4Dc_bri9mjs