How do i send data through teleport service?
02 | local player = game.Players.LocalPlayer |
03 | local rep = game:GetService( "ReplicatedStorage" ) |
04 | local events = rep:WaitForChild( "RemoteEvents" ) |
05 | local cacEvent = events:WaitForChild( "CAC" ) |
06 | local player = game.Players.LocalPlayer |
07 | local data = player:WaitForChild( "CACData" ) |
08 | local hairValue = data:WaitForChild( "Hair" ) |
09 | local hairColorValue = data:WaitForChild( "HairColor" ) |
10 | local ShirtValue = data:WaitForChild( "Shirt" ) |
11 | local PantValue = data:WaitForChild( "Pant" ) |
14 | [ "Hair" ] = hairValue.Value; |
15 | [ "HairColor" ] = hairColorValue.Value; |
16 | [ "Shirt" ] = ShirtValue.Value; |
17 | [ "Pant" ] = PantValue.Value; |
19 | script.Parent.MouseButton 1 Down:Connect( function () |
20 | game:GetService( "TeleportService" ):Teleport( 2017040087 ,player, data) |
03 | local rep = game:GetService( "ReplicatedStorage" ) |
04 | local events = rep:WaitForChild( "RemoteEvents" ) |
05 | local cacEvent = events:WaitForChild( "CAC" ) |
06 | local player = game.Players.LocalPlayer |
09 | local data = game:GetService( "TeleportService" ):GetLocalPlayerTeleportData() |
11 | hairValue = data [ "Hair" ] |
12 | hairColorValue = data [ "HairColor" ] |
13 | ShirtValue = data [ "Shirt" ] |
14 | PantValue = data [ "Pant" ] |
16 | cacEvent:FireServer(hairValue, hairColorValue, ShirtValue, PantValue) |
Although this works, the print and everything. The data sent through is not identical to the one from the start place. Why does this happen and how do i fix it?