I’ve tried remoteevents, bindableevents, and everything in between. I can’t seem to pass information from the ServerScriptService to the workspace. I need to change _G.problemSolution1 to the ‘result’ variable but also do it in the Workspace as well since that’s where I need the information to be.
This is the script inside of my ServerScriptService just to give an idea of what I’m working with. I’ve tried RemoteEvents multiple times, bindablevents, I am new to scripting and I really need to pass this information to the Workspace
game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(message)print("checking", _G.problemEditing) if _G.problemEditing == 0 then print("0") else print("yes! ", _G.problemEditing) workspace.textProblem1.SurfaceGui.TextLabel.Text = message local equation = message local numbers = message.split(equation, "+") local num1 = tonumber(numbers[1]) local num2 = tonumber(numbers[2]) local result = num1 + num2 print("Result:", result) _G.problemSolution1 = result local problemEditing = _G.problemEditing _G.problemEditing = 0 end
end)
end)
Any ideas?