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

What kind of error is this?

First off I'd like to thank you all for all the help you guys give. I just learned about basic coding from a book I got and it is really starting to come to me that I love scripting.

Now onto my problem.

ding = game.Lighting.CheckIn.TextButton
ping = game.Workspace.Con

script.Parent.MouseButton1Click:connect(function (onClicked)
	if MouseButton1Click then
		print ('Is this working..?')
     	ding = Color3.new = ("Lime green")
		ping.CanCollide = true
		wait (1)
		ping.Veolocity = Vector3.new(0,0,-1)
		wait(0.8)
		ping.Velocity = Vector3.new(0,0,-2)
		wait(0.8)
		ping.Velocity = Vector3.new(0,0,-3)
		wait(0.8)
		ping.Velocity = Vector3.new(0,0,-4)
		wait(0.8)
		ping.Velocity = Vector3.new(0,0,-5)
		wait(0.8)
		ping.Velocity = Vector3.new(0,0,-4)
		wait(0.8)
		ping.Velocity = Vector3.new(0,0,-3)
		wait(0.8)
		ping.Velocity = Vector3.new(0,0,-3)
		wait(0.8)
		ping.Velocity = Vector3.new(0,0,-2)
		wait(0.8)
		ping.Velocity = Vector3.new(0,0,-1)
		wait(0.8)
		ping.Velocity = Vector3.new(0,0,0)
		ping.CanCollide = false
		wait(3)
		ding = TextButtonColor.new("Really red")
    end


Basically, this line:

	ding = Color3.new = ("Lime green")

is getting an error:

16:40:34.833 - Workspace.Script:5: 'then' expected near '='

I've searched Wiki but nothing. Any help?

1 answer

✓ Accepted answer

The problem here is you are trying to check a BoolValue using if, but what you are checking is an event.

Allow me to explain further.

If only works in the event that what your variables are hold value. MouseButton1Click holds no value. It is an event, meaning it is connected using the connect function.

So just delete line 5 and it's corresponding 'end.'

3 comments

0

You've been helping me all day Urban, thank you! Thanks!

0

Ok just tried this in studio, and it says this is an error: "ding = Color3.new = ("Lime green")" and the error says this: "17:33:40.945 - Players.Player.PlayerGui.CheckIn.TextButton.Script:6: unexpected symbol near '='"

0

ding = Color3.new("Lime green")

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