#script code not working
1 messages · Page 1 of 1 (latest)
"Value", not "vaule"
yeh ik i chnaged that
but it still dose not work
ill show you what i mean give me a sec
here
@silk geode
no change the leader stat to 0
you wrote that in the code urself
if the part's number is bigger than the leader stat by 1 it update the leaderstat
i changed it still not working
can i see the footage?
like again?
ye
i changed it
also, turn on the output tab
i think i put it in the right spot
bro 💔
why?
** You are now Level 1! **
did i not?
i said change the leaderstat value to 0
did i not do that?
to see if the script has error ofc
you didnt
what i thought i did
im talking about this
capitilize the s in stage in the checkpoint script then...
it should have been player.leaderstats.Stage.Value
and change Stage.Value to 0
stil dont work
any error?
uhmm just send me the output tab if it has error
wym send you the output tab
like this
you gonna fix it?
yes
oh ty man
** You are now Level 2! **
doy uo want me to invite you to the roblox studios or smth?
oh i didnt say im gonna directly fix it
ohh mb
i will send you the script so you know what's wrong
** You are now Level 5! **
make sure to turn on the spawnpouint 's cantouch if you somehow turned it off
game.Players.PlayerAdded:Connect(function(player)
local ls = Instance.new("Folder", player)
ls.Name = "leaderstats"
local stage = Instance.new("IntValue", ls)
stage.Value = 0
stage.Name = "Stage"
end)
local stagenumber = tonumber(script.Parent.Name)
local PS = game:GetService("Players")
script.Parent.Touched:Connect(function(hit)
local character
if hit.Parent:FindFirstChild("Humanoid") then
character = hit.Parent
elseif hit.Parent.Parent:FindFirstChild("Humanoid") then
character = hit.Parent.Parent
end
local player = PS:GetPlayerFromCharacter(character)
local playerstage = player.leaderstats.Stage
if stagenumber - playerstage.Value == 1 then
playerstage.Value = stagenumber
end
end)
oh
just like you did before
one leaderbored one checkpoint?
yes
this?
one is in scriptservice and one is in "1"
is there any red in output tab?
yes, it's there to confirm the instance of the character
@normal summit so does it work?
no
change part's name to 1
"leaderbored" 🥀
youdidnt waste my time lol, it was my decision to spend time helping you
fair enough
but tyt
ty
been trying to figure that out for like a hour
i got a quick question
you dont have to help me
but when i press play it just telports me to the void
i would need a video to see that....
im watching a tut on it but they just skip it
** You are now Level 3! **
is there any extra script you added that wasnt the two?
oh this is kinda silly, when the character is added to the game you should teleport the character to the spawnpoint
keep watching the tutorial, and they prob will explain it
they dont they skip it
this the script i was trying to copy
he just skips how he made the checkpoint work
do i need to add another script?
for real....
change the value of this one to 1
it dont work
@normal summit update the leaderbored
game.Players.PlayerAdded:Connect(function(player)
local ls = Instance.new("Folder", player)
ls.Name = "leaderstats"
local stage = Instance.new("IntValue", ls)
stage.Value = 1
stage.Name = "Stage"
player.CharacterAdded:Connect(function(char)
char.PrimaryPart.CFrame = workspace[tostring(stage.Value)].CFrame
end)
end)
it works completly fine for me
where do you store the checkpoint parts?
like
what folder?
is that folder in the workspace?
yes
change this part "workspace[tostring(stage.Value)].CFrame"
to
workspace.checkpoints[tostring(stage.Value)].CFrame
yes
like what iis the stuff in the "checkpoints" fodler looks like
INSIDE the checkpoints folder
fr...
update that part i told you earlier with this
workspace.checkpoints["checkpoint "..tostring(stage.Value)][tostring(stage.Value)].CFrame
in the leaderbored one right?
yes
mind sending me output tab?
** You are now Level 6! **
bro 💔
** You are now Level 4! **
it's
char.PrimaryPart.CFrame = workspace.checkpoints["checkpoint "..tostring(stage.Value)][tostring(stage.Value)].CFrame
all in one?
paste that in the line with the red underline
Yes give me one sec