generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Hunger script broken in gameserver but not studio

Previous Thread :: Next Thread 
thesecondcomingdoom is not online. thesecondcomingdoom
Joined: 09 Feb 2016
Total Posts: 1020
12 Feb 2016 07:54 PM
--I'm sorry if i post too much. i just love making games.

game.Players.LocalPlayer.CharacterAdded:wait()
thingy = 1

while true do
thingy = script.Parent:WaitForChild("Waste").Value
if game.Players.LocalPlayer.leaderstats.Hunger.Value == 0 then
game.Players.LocalPlayer.Character.Humanoid.Health = game.Players.LocalPlayer.Character.Humanoid.Health - 1
wait(0.1)
elseif game.Players.LocalPlayer.Character.Humanoid.Health == 0 then
wait()
else
game.Players.LocalPlayer.leaderstats.Hunger.Value = game.Players.LocalPlayer.leaderstats.Hunger.Value - thingy
game.Players.LocalPlayer.Character.Humanoid.JumpPower = game.Players.LocalPlayer.leaderstats.Hunger.Value*0.5
wait(3)
end
end

--Located in SCREENGUI--
-- extra info
-- i made a hunger fixing script too. that one doesnt work too.

--ANOTHER LOCALSCRIPT INSIDE THE LOCALSCRIPT--

player = game.Players.LocalPlayer

function onchange()
if player.leaderstats.Hunger.Value >= 100 then
player.leaderstats.Hunger.Value = 100
end
end

player.leaderstats.Hunger.Changed:connect(onchange)




--TL;DR these 2 scripts work in studio finely but ingame break.
Report Abuse
thesecondcomingdoom is not online. thesecondcomingdoom
Joined: 09 Feb 2016
Total Posts: 1020
12 Feb 2016 07:57 PM
NOEDIT : Waste.Value changes with this script in screengui too

-- insanityscripter
--Drag this script into the StarterGui folder.
repeat wait() until game.Players.LocalPlayer

m = game.Players.LocalPlayer:GetMouse()

m.KeyDown:connect(function(key)
if key == "0" then --"Shift to run" 0 == shift
script.Parent.Waste.Value = 3
print("Running")
game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 25 --change "25" to your speed you want
end
end)

m.KeyUp:connect(function(key)
if key == "0" then
script.Parent.Waste.Value = 1
game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16 --change "16" to your speed you want when you stop running
end
end)
Report Abuse
thesecondcomingdoom is not online. thesecondcomingdoom
Joined: 09 Feb 2016
Total Posts: 1020
12 Feb 2016 08:18 PM
Bump EDIT : i guess i could put the hunger script somewhere else?
Report Abuse
thesecondcomingdoom is not online. thesecondcomingdoom
Joined: 09 Feb 2016
Total Posts: 1020
12 Feb 2016 08:27 PM
Bump 2 edit : doesn't work.
Report Abuse
thesecondcomingdoom is not online. thesecondcomingdoom
Joined: 09 Feb 2016
Total Posts: 1020
12 Feb 2016 08:57 PM
Bump 3 : anyone help
Report Abuse
cpmoderator12345 is not online. cpmoderator12345
Joined: 26 Jan 2013
Total Posts: 15651
12 Feb 2016 08:58 PM
its a localscript isnt it
does your game have filteringenabled


https://www.youtube.com/watch?v=onhFH7jpq2c
Report Abuse
thesecondcomingdoom is not online. thesecondcomingdoom
Joined: 09 Feb 2016
Total Posts: 1020
12 Feb 2016 09:04 PM
FilteringEnabled disabled

localscript
Report Abuse
thesecondcomingdoom is not online. thesecondcomingdoom
Joined: 09 Feb 2016
Total Posts: 1020
12 Feb 2016 09:14 PM
Edit : should i use modulescript?
Report Abuse
thesecondcomingdoom is not online. thesecondcomingdoom
Joined: 09 Feb 2016
Total Posts: 1020
12 Feb 2016 09:25 PM
bump
Report Abuse
thesecondcomingdoom is not online. thesecondcomingdoom
Joined: 09 Feb 2016
Total Posts: 1020
12 Feb 2016 09:44 PM
bump...
Report Abuse
128Gigabytes is online. 128Gigabytes
Joined: 17 Apr 2014
Total Posts: 3616
12 Feb 2016 09:45 PM
Is there any output?
Report Abuse
thesecondcomingdoom is not online. thesecondcomingdoom
Joined: 09 Feb 2016
Total Posts: 1020
12 Feb 2016 09:51 PM
bump...
Report Abuse
thesecondcomingdoom is not online. thesecondcomingdoom
Joined: 09 Feb 2016
Total Posts: 1020
12 Feb 2016 09:51 PM
How do i see the output????
Report Abuse
128Gigabytes is online. 128Gigabytes
Joined: 17 Apr 2014
Total Posts: 3616
12 Feb 2016 10:18 PM
Press F9 while in game to open output.
Report Abuse
thesecondcomingdoom is not online. thesecondcomingdoom
Joined: 09 Feb 2016
Total Posts: 1020
13 Feb 2016 09:12 AM
Random number values only. What to do?
Report Abuse
thesecondcomingdoom is not online. thesecondcomingdoom
Joined: 09 Feb 2016
Total Posts: 1020
13 Feb 2016 11:00 AM
Bump.
Report Abuse
thesecondcomingdoom is not online. thesecondcomingdoom
Joined: 09 Feb 2016
Total Posts: 1020
13 Feb 2016 11:11 AM
bump2. tried every every everything i could. still broken :(
Report Abuse
indeimaus is not online. indeimaus
Joined: 01 Sep 2014
Total Posts: 4285
13 Feb 2016 11:15 AM
use game:GetService("Players").LocalPlayer
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image