Not much to tell except that I don't know what U+202c means. This is the error: Workspace.Hall.Script:10: Unexpected Unicode character: U+202c and here is my script:
Hall = script.Parent PrimaryPart = Hall.PrimaryPart PrimaryPart.Position = Vector3.new(133.875, 0.063, 29.125) hallClone = Hall:Clone() hallClone.Parent = game.Workspace hallClone.Name = "HallClone" HallCount = 0 function AddHall(count) local positionCloneX = 133.875 - count * 112.25 print(positionCloneX) HallClone.PrimaryPart end PrimaryPart.Touched:connect(function(hit) if hit.Parent == game.Players then HallCount = HallCount + 1 print(HallCount) AddHall(HallCount) end end)
Keep in mind that this script is just a draft and not complete.
I think I do the math wrong, after all I feel really dumb for not knowing this.
Every answer counts! Thank you
Edit: After a little research, I found out that U+202c is -. So, my question has changed: How does one subtract in scripting. I don't want a literal answer, I want it to have a connection with my script.
U+202c is the control character Pop directional formatting
which could be inserted if you have a language or input configuration which typically depends on right-to-left formatting such as Arabic scripts.
Using -
is the correct way to subtract, and the U+202c control character is typically invisible. Ensure that you're using only left-to-right input methods when writing your scripts.
Your math is incorrect. You need to add parenthesis in order for your program to run. Your options are:
local positionCloneX = (133.875 - count) * 112.25
And
local positionCloneX = 133.875 - (count * 112.25)
I assume you want to use the first option because of how your code was originally formatted. I hope this solves your problem.