Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

3 comments

0

Use code block properly.

0

how?

0

done

1 answer

✓ Accepted answer

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.) *

3 comments

0

Btw are you a python user, because I seen python programs that do the +1 thing.

0

no i am new user in roblox studio and i am learning scripts first time. Thx For your Help It worked :)

0

oh ok, No problem!

This discussion is preserved as it was. New answers, comments, and votes are closed.