u̶g̶h̶ ̶i̶ ̶h̶a̶t̶e̶ ̶r̶e̶m̶o̶t̶e̶ ̶e̶v̶e̶n̶t̶s̶
i changed the server script a little:
dont steal my code >:(
so thats the listening for it, then i should fire from the local script?
and now on the local script i have no idea what to do:
(literally the local script, in StarterCharacterScripts
Welp, I tried. I have no clue how the camera works, but I assumed that they were just part of the Workspace, so I went with how I deal with parts. Guess I messed it up haha.
This is something that’d you need to send from the server to the client and not vice versa. If you’re sending it from the client, it can easily be intercepted by exploiters and they could break your game. I can assist you with using a remote event if you want. Also camera manipulation has to be done on the client.
Trying to find a solution to this warning, the thread I posted earlier has people saying the issue has persisted for many months, seems like it still wasn’t fixed.
Alright, so I’m not getting the warning and the only thing I did different in my script was set the subject before the camera type. Let me know if that fixes the issue for you!
the camera doesnt follow with the part, and its the player doesnt teleport to the game (or the spawn) anymore once the game starts (that has actually been happening since post 9)
and the warning appears right after the cutscene ends, but that warning doesnt break the camera
Consider tweening the camera’s CFrame between 2 parts instead of moving the part. This is what I did:
local camera = workspace.CurrentCamera
camera.CameraSubject = workspace.StartPos
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = workspace.StartPos.CFrame
wait(2)
TweenService:Create(workspace.CurrentCamera, TweenInfo.new(5), {CFrame = workspace.EndPos.CFrame}):Play()
Of course, mine was just for testing purposes. Gave me this result:
EDIT: Realized the gif doesn’t load because it’s too big, anyways here’s a compressed one:
Doing this, the orientation of the end part is also used because of how CFrames work.
Make sure the front face of the part is facing where you want the camera to be looking. I think roblox removed the functionality to see the face, for whatever reason, I use a plugin called Face Selector
This will also fix your other warning. As for the teleporting, are you sure the function being called (also change pairs to ipairs, which is what you use for list/array iteration)?
Can you just try this, run it, and then show me your console?
local playerModule = {}
local roundInfo = game:GetService("ReplicatedStorage").RoundInfo
function playerModule.teleportPlayer(playerName, teleportLocation)
print("Teleport player executued - Teleporting ".. playerName)
local gamePlayer = game.Players:FindFirstChild(playerName)
print(gamePlayer)
print(teleportLocation)
if gamePlayer then
local character = gamePlayer.Character or gamePlayer.CharacterAdded:Wait()
character.HumanoidRootPart.CFrame = teleportLocation.CFrame
end
end
function playerModule.teleportAllPlayers(teleportLocation)
print("Teleport all players executed")
for index, player in ipairs(roundInfo.Players:GetChildren()) do
print("Teleport all players - Teleporting ".. player.Name)
playerModule.teleportPlayer(player.Name, teleportLocation)
end
end
function playerModule.respawnAllPlayers()
for index, player in ipairs(roundInfo.Players:GetChildren()) do
local gamePlayer = game.Players:FindFirstChild(player.Name)
if gamePlayer then
gamePlayer:LoadCharacter()
end
end
end
game.Players.PlayerAdded:Connect(function(player)
local marker = Instance.new("StringValue", roundInfo.Players)
marker.Name = player.Name
end)
return playerModule
Afterwards when we find the issue you can remove the prints, I just don’t know a lot about your scripts, so this is an ok way to see if everything is executing, and if it isn’t where it stops.
Teleport all players executed prints, everything else doesnt, as its not used, i think its right here print("Teleport all players - Teleporting ".. player.Name)
I should’ve added a print in teleportAllPlayers for print(roundInfo.Players:GetChildren()) it seems like it may be empty if nothing else is printing. Are you getting any errors?
Alright, if there’s no errors and no table printed, it could just be empty, make sure roundInfo.Players is actually being populated with players, should be able to be something you can see in the workspace when you’re in play test mode. I actually dont see where teleportAllPlayers is even called, but you said it prints so I assume it’s just in some script I haven’t seen. So yeah that’s all I can think of anyways is Players not being filled up and something that happened between post 8 and 9 maybe had been accidentally removed.