local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect (function()
player.TeamColor = BrickColor.new ('Neon orange')
player:LoadCharacter()
end)
Use a colon instead of a period when using methods.
I think the reason why you might be confused is because a programming language called Python uses period and not colons when using a method, like this:
`class Rocket():
def init(self):
self.x = 0
self.y = 0
def move_up(self):
self.y += 1
my_rocket = Rocket()
print("Rocket altitude:", my_rocket.y)
my_rocket.move_up()
print("Rocket altitude:", my_rocket.y)
my_rocket.move_up()
print("Rocket altitude:", my_rocket.y)`
If that is why, don't be worried; just remember that Lua uses colons and not periods.
1 comment
Oh alright thanks!