I’ll only provide relevant code but im basically trying to make a cutscene plugin, since making them by hand horribly sucks.
My current goal is to insert a table of positions into a modulescript, done by the server and accessed by the client. The reason I want to use .Source is so everything is easily available and not hidden by roblox as if i were to use a table inside the module. I’ve gotten to the point where the data is where it should be however it’s still encoded
EX:
[{"1":[-350.4974060058594,189.60598754882813,0.9551732540130615,0,0,0]},{"2":[-362.3487854003906,189.60598754882813,29.424396514892579,0,0,0]},{"3":[-375.6524658203125,189.60598754882813,61.3824462890625,0,0,0]},{"4":[-388.8741149902344,189.60598754882813,93.14337158203125,0,0,0]}]
I need this decoded and put into a table somehow, and I’m just completely stumped as to how I’m going to do that. Any help is appreciated.
Relevant code:
Server
local Waypoints = {}
table.insert(Waypoints, {[part.Name] = {
[1] = part.CFrame.Position.X,
[2] = part.CFrame.Position.Y,
[3] = part.CFrame.Position.Z,
[4] = part.CFrame.Rotation.X,
[5] = part.CFrame.Rotation.Y,
[6] = part.CFrame.Rotation.Z,
}})
Cutscenescript.WaypointTable.Source = game:GetService("HttpService"):JSONEncode(Waypoints)
Client
local Waypoints = require(script.WaypointTable)
Why I can’t leave it like this