#I did something wrong :C
128 messages · Page 1 of 1 (latest)
U never defined the variable "counter", and you have to use the path to the player u want to teleport
subt0silver isnt defined
enlgish pls
ok so do u know variables?
not really
ok so variables have two parts
the name of the variable
and what is actually contained in the variable
so the value of the variable
to make a variable u do:
local x = 21
this is a variable called x with the value 21
now whenever u wanna use 21 in ur code, u dont have to explicitly write 21, u can just use x
then u do algebra
** You are now Level 2! **
u cant do x+y if you havent defined what y is
x+y = 21
21-x=y
basically all im saying is
for example
u wrote subt0silver
and it's giving a red underline
cuz it doesnt know what subt0silver is
:/
because u didnt tell it what subt0silver is
ok but u didnt write that
u cant just do subt0silver = player
because it doesnt know what player is
player isnt a keyword or anything
how do i explain player
wow
local subt0silver = game.Players.LocalPlayer
u can keep the name of the variable as subt0silver for now
yey :D
but u should learn later how localplayer and local scripts work
ok
another thing to miserably fail at :D
when u play a game on roblox
I'm very confused on how you learned coding like this without knowing what variables are
the server is the computer that's running the game at roblox HQ (for example)
Is this an ai script?
the clients are the devices/computers that connected to the game, aka the players
(normal) scripts run on the server
and local scripts appear on the client devices
and run there
brb
when u do localplayer, it refers to oneself
right but variables exist in every single programming language
so basically 3 players join the game, each of them will have the same local scripts and those local scripts will run for them on their own computer
and they're the first thing anybody learns when they learn how to code
if u do something like print(game.Players.LocalPlayer) in a local script, on each of those 3 players' computer it will print their player name
cuz each player is a different player
alright please just watch some videos about the basics of lua(variables, functions, types, etc.)
@brazen wadi ty
np
no
yep
ur saying that "counter is itself plus 1" (increasing it by 1)
but what even is counter
also in the if statement when u do equality check, u have to use ==
0 + 1 = 1
cuz just 1 = is for assignment while 2 = means equality check
now ima test
** You are now Level 3! **
any errors in the output?
can i see your full script?
idk
also u cant teleport in studio
u have to play the game on roblox
and u also need to enable that one game setting
OH
to allow teleporting
are you testing it in studio
then u gotta publish ur game and try on roblox