Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What dose this Error Means? Error:(10,27)Expected identifier when parsing expression,got'+'

Asked by 4 years ago
Edited 4 years ago

i made an touch function and that function will increase my intvalue and teleport player But intvalue is not increasing.

i am confused that what to do.

on 10 line (game.workspace.PL.Value) underlined with red color

it says This:

Error:(10,27)Expected identifier when parsing expression,got'+'

Script:

function onTouch(part)
if part.Parent.Humanoid ~=nil then
part.Parent:MoveTo(script.Parent.Parent.Part1.Position)     
script.Parent.Parent.Part1.Script.Disabled = true 
wait(2)
script.Parent.Parent.Part1.Script.Disabled = false
end
end
script.Parent.Touched:connect(onTouch)
game.workspace.PL.Value + 1
0
Use code block properly. Dovydas1118 1495 — 4y
0
how? KingUmerThe1 -3 — 4y
0
done KingUmerThe1 -3 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago
Edited 4 years ago

I see the error straight away. Just do this:

--Replace line 10 with this code below
game.Workspace.PL.Value = game.Workspace.PL.Value + 1

*(Note: Do not use game.workspace as it is deprecated. Use either workspace or game.Workspace.) *

0
Btw are you a python user, because I seen python programs that do the +1 thing. Dovydas1118 1495 — 4y
0
no i am new user in roblox studio and i am learning scripts first time. Thx For your Help It worked :) KingUmerThe1 -3 — 4y
0
oh ok, No problem! Dovydas1118 1495 — 4y
Ad

Answer this question