Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[FIXED]What's wrong with my Script?[FIXED}

Asked by
Emg14 10
10 years ago

So here's the tree pointing to the location of the script if helpful: ==Workspace== ==Automated== -Game(Script)- ==Automated== ==Workspace== Here's the script's code:

001--[[Variables]]--
002local respawnTime = 1
003local ds = game:GetService("DataStoreService"):GetDataStore("Stage")
004local Players = game:GetService("Players")
005Players.CharacterAutoLoads = false
006--[[Variables]]--
007 
008--[[Game Handling]]--
009Players.PlayerAdded:connect(function(Player)
010    Player.CharacterAdded:connect(function(Character)
011        --[[Variables]]--
012        Humanoid = Character:FindFirstChild("Humanoid")
013        --[[Variables]]--
014 
015        --[[Leaderstats]]--
View all 103 lines...

I think the problem is on line 23 to 25. When I test the game(I know the DataStore won't work), I get the Stage(IntValue) in my leaderstats. Now instead of seeing Time, I see Value(IntValue) on the next one.

Pls help me, I'm an intermediate scripter that needs help!!!

1 answer

Log in to vote
1
Answered by 10 years ago

Ill show you how you can fix it, first of all, lines 38-84, Instead of putting ~~~~~~~~~~~~~~~~~ if Player.leaderstats.Stage.Value == 1 then Humanoid.Parent:MoveTo(workspace.Obstacles.Checkpoints["1"] ~~~~~~~~~~~~~~~~~

1if Player.leaderstats.Stage.Value == 1 then
2Player:GetCharacter().Torso.CFrame = CFrame.new(workspace.Obstacles.CheckPoints["1"]:GetModelCFrame())

Use this method to move the player^

0
I'm going to try Emg14 10 — 10y
0
My MoveTo method used to work but now it doesnt. My old method was to get the CFrame of the torso and teleport the character to the postion of the level which had the nice little jump animation if you try it. Emg14 10 — 10y
0
I fixed it! I examined your code then realized what happened! Thx!!! Emg14 10 — 10y
Ad

Answer this question