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

Output says Incomplete statement: expected assignment or a function call can anybody help?

Stamina = script.Parent
StaminaBar = game.Workspace.StamBar.BillboardGui.Frame

StaminaBar = Stamina
if Stamina > 0 then
	Stamina.CanRun = true
else
	Stamina.CanRun = false
end

StaminaBar.Size = Stamina

if Stamina > 0 then
		Stamina.Value + 0.5
		wait("0.25")
else
	if Stamina = 0 then
		Stamina.Value == 0.1
	end
end

3 comments

0

About your comment, im gonna edit my question, check back in 5 mins

0

I changed my answer, check it out.

0

Sorry, didn’t edit it right!

1 answer

✓ Accepted answer

Your problem is that you are trying to set a frame to a value, which is impossible (line 4)

Stamina = script.Parent
StaminaBar = game.Workspace.StamBar.BillboardGui.Frame

StaminaBar = Stamina -- // Problem

Also, your if statment on line 17 is not complete, when asking if something is equal to somethis use == not = Change line 17 to this:

if stamina == 0 then

You will also need to change line 14 to this:

Stamina.Value += 0.5

Check the "Accept answer" box below if this helped!

2 comments

0

Thank you for the help! But the problem seems to be on Line 14.

0

It's still having issues with line 14. "Incomplete statement: expected assignment or a function call"

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