I tried WaitForChild and Now I tried FindFirstChild and this is not working I even did a check to make sure the item is not Miss-spelled and it is still not working please help
Video
Roblox VR 2024.05.03 - 17.25.08.03.mp4
Script:
local Players = game.Players:GetPlayers()
local Sounds = script:WaitForChild("Playtime Sounds")
local HitBox = script.Parent
local Playtimegui = game.StarterGui:WaitForChild("Playtime ui")
local Rope = Playtimegui:WaitForChild("Rope")
local minigameprogress = script:WaitForChild("minigameprogress")
local minigameprogresstext = Playtimegui.Frame:WaitForChild("jumprope progress")
local contentloader = game:GetService("ContentProvider")
local isplaytimeavailable = script:WaitForChild("Isplaytimeavailable")
Sounds["Playtime's Theme"]:Play()
Ropeassets = {
"rbxassetid://17309020766",
"rbxassetid://17309020583",
"rbxassetid://17309020358",
"rbxassetid://17309020210",
"rbxassetid://17309020023"
}
minigameprogress.Changed:Connect(function()
minigameprogresstext.Value = minigameprogress
end)
contentloader:PreloadAsync(Ropeassets)
HitBox.Touched:Connect(function(part)
local plr = game:GetService("Players"):GetPlayerFromCharacter(part.Parent)
if plr then
if plr:FindFirstChild("Student") and plr:FindFirstChild("isplaying") then
if plr.isplaying.Value == false and isplaytimeavailable == true then
plr.isplaying.Value = true
isplaytimeavailable = false
wait(0.2)
plr.Character.Humanoid.WalkSpeed = 0
plr.Character.Humanoid.JumpPower = 30
Sounds["Playtime ready go!"]:Play()
Playtimegui.Enabled = true
Sounds["Playtime ready go!"]:Play()
wait(Sounds["Playtime ready go!"].TimeLength)
minigame(plr)
else
print(plr.Name.." Doe's not have the Student tag!")
end
end
end
end)
function minigame(plr)
Rope.Image = "rbxassetid://17309020766"
wait(0.2)
Rope.Image = "rbxassetid://17309020583"
wait(0.2)
Rope.Image = "rbxassetid://17309020358"
wait(0.2)
Rope.Image = "rbxassetid://17309020210"
wait(0.2)
Rope.Image = "rbxassetid://17309020023"
wait(0.2)
Rope.Image = ""
if plr.Character.Humanoid:GetState() == Enum.HumanoidStateType.Jumping then
if minigameprogress == 0 then
Sounds["Playtime 1"]:Play()
minigameprogress = minigameprogress + 1
end
else
Sounds["Playtime oops!"]:Play()
minigameprogress = 0
end
if minigameprogress == 5 then
plr.Playtimeui:Destroy()
plr.Character.Humanoid.WalkSpeed = 16
plr.Character.Humanoid.JumpPower = 0
plr.isplaying.Value = false
end
end