(Answered) Why am I recieving "tables cannot be cyclic?"
Asked by
4 years ago Edited 4 years ago
I am receiving a "tables cannot be cyclic" error from line #10 of the following script:
01 | local ServerScriptService = game:GetService( "ServerScriptService" ) |
02 | local ChatServiceRunner = ServerScriptService:WaitForChild( "ChatServiceRunner" ) |
03 | local ChatService = require(ChatServiceRunner.ChatService) |
05 | local giveTag = game.ReplicatedStorage.GiveTag |
07 | giveTag.OnServerEvent:Connect( function (player) |
08 | local speaker = ChatService:GetSpeaker(player.Name) |
10 | local class = game.ReplicatedStorage:WaitForChild(speaker):WaitForChild( "Class" ) |
13 | { TagText = class, TagColor = Color 3. new( 1 , 0 , 0 ) } , |
15 | if speaker and speaker:GetPlayer() then |
16 | speaker:SetExtraData( "Tags" , DefaultTags) |
The "class value" that line #10 is looking for is a StringValue that is generated by the script below; players' "class value" exists within its own individual folder sharing the same name as its designated player.
1 | game.Players.PlayerAdded:connect( function (player) |
2 | local folder = Instance.new( "Folder" ) |
3 | folder.Parent = game.ReplicatedStorage |
4 | folder.Name = player.Name |
5 | local Class = Instance.new( "StringValue" , folder) |
7 | Class.Value = "No class" |
If additional clarification is needed, please don't hesitate to tell me. All help is appreciated!