Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Very strange problem, can someone help?

Asked by 9 years ago

I am working on a game which has FilteringEnabled active, when a player joins a local script is cloned to their character in workspace which fixes the camera in place and activates a remote event causing a script in workspace to move the character to another room.

The scripts work fine in test mode however when published or when I start the server the character is not teleported on the clients screen but on the server the player is in the correct place as shown in the screenshot below:

https://gyazo.com/e50a7f62f03c2247a8f15f97f0213d25

The code on the server script in workspace is:

01game.Players.PlayerAdded:connect(function( player )
02 
03    print(player.Name ..tostring(" has joined"))
04 
05    repeat wait() until player.Character.Torso
06 
07            local character = player.Character
08 
09            wait(0.1)
10            script.CameraScript:clone().Parent = character
11 
12end)
13 
14 
15 
View all 40 lines...

The code on the client is:

01local cam = workspace.CurrentCamera
02local Torso = script.Parent.Torso
03 
04print("Fireing server")
05 
06local wiatForResponse = game.Workspace.Teleport.ClReady:InvokeServer(reply)
07 
08cam.CameraSubject = Torso
09cam.Focus = CFrame.new(Torso.Position)
10cam.CameraType = "Scriptable"
11cam.CoordinateFrame = CFrame.new(Torso.Position - Vector3.new(3, -3, 10), Torso.Position + Vector3.new(-4, 0, 0))
0
Do you get any errors in the output window? AwsomeSpongebob 350 — 9y

Answer this question