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 » Scripting Helpers
Home Search
 

Got a problem with your script? I'll try to fix it.

Previous Thread :: Next Thread 
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
10 Aug 2011 05:39 PM
@DTim: That creates 10 droplets a second so yes, it may lag. Assuming it works, try changing 0.1 to a larger number, say, 0.5, and see if that lagsnl.

@BELLY: Yeah, that's not really Lua what you've got there. Do you actually know how to script, or did you make something up in the hope that I'd write something for you?

@MARIO: LOLOLOLOLO
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
10 Aug 2011 06:21 PM
Bump, if no more posts by half past I'm going to bed
Report Abuse
sharky99 is not online. sharky99
Joined: 18 Dec 2008
Total Posts: 3364
10 Aug 2011 06:22 PM
game:service("InsertService"):LoadAsset("http://www.roblox.com/Asset/?id=58913617").Parent=script

wont works says, 'Unable to cast string to int'
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
10 Aug 2011 06:24 PM
Sharky look on your thread...

game:service("InsertService"):LoadAsset(58913617).Parent=script
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
10 Aug 2011 06:27 PM
'int' refers to a number, so I'm guessing it tried to convert a string to a number and failed. Check the asset link works.

Also, ':service()'? I haven't seen that before, though I'm guessing it works, otherwise you wouldn't have done it.
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
10 Aug 2011 06:31 PM
...

*facepalm*

im stoopid

I think that's my cue to get some sleep. Nightynight.
Report Abuse
BELLYBUTTONMAN5 is not online. BELLYBUTTONMAN5
Joined: 03 Jul 2010
Total Posts: 160
10 Aug 2011 08:39 PM
OK KAN ANYONE TELL ME A WEBSITE URL THAT U THINK IS A REALLY GOOD WEBSITE FOR LEARNING HOW TO SCRIPT LIKE A LUA SITE I DON'T CARE
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
11 Aug 2011 06:22 AM
the wiki

the official lua website if you're feeling gung-ho
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
11 Aug 2011 09:14 AM
Bump for help.
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
11 Aug 2011 09:16 AM
Ok, I seriously want help now, can you help me add Data Presistence to save all the values other than "TestPoints" in this? :)




game.Players.PlayerAdded:connect(function(Player)
local Leaderstats = Instance.new("IntValue")
Leaderstats.Name = "leaderstats"
Leaderstats.Parent = Player

local Points = Instance.new("IntValue", Player)
Points.Name = "TestPoints"
Points.Value = 0

local Points = Instance.new("IntValue", Player)
Points.Name = "Fuel"
Points.Value = 0

local Points = Instance.new("IntValue", Leaderstats)
Points.Name = "Cash"
Points.Value = 0

local Level = Instance.new("IntValue", Leaderstats)
Level.Name = "Level"
Level.Value = 1

local OneHundred = 100
local RealPoints = 0
local OldPoints = Player.TestPoints.Value
Player.TestPoints.Changed:connect(function(Val)
RealPoints = RealPoints + (Val - OldPoints)
OldPoints = Val
if RealPoints >= 100 then
RealPoints = RealPoints - 100
Level.Value = Level.Value + 1
end
end)
end)
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
11 Aug 2011 09:19 AM
Anything I ever do with DP always messes up.
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
11 Aug 2011 09:34 AM
I've never actually used it before. I guess loading is easy enough, it's just like

scoreorsomething.Value = plr:LoadNumber("score")

though you'd need something to wait for the data to load in there.

Then whenever they change, save. Like

scoreorsomething.Change:connect(function () plr:SaveNumber("score", scoreorsomething.Value end)

There is something called SaveLeaderboardData() but I dunno how that works.
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
11 Aug 2011 09:39 AM
Lawl, please learn and help me, I struggle with DP.


http://wiki.roblox.com/index.php/ROBLOX_Scripting_How_To:_Data_Persistence
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
11 Aug 2011 09:44 AM
well you'll need this

plr:WaitForDataReady()


or you'll die

trying to find out more about the pcall() bit because I don't believe it
Report Abuse
huner2 is not online. huner2
Joined: 27 Apr 2008
Total Posts: 1681
11 Aug 2011 09:50 AM
Uhh this script is supposed to say a hint on everyone's screen when shot but when I shoot it nothing happens.How can I fix this?Here's the script:

Messages = {"Hi","Hello","Change this message"}
script.Parent.Touched:connect(function(h)
if not game.Workspace:FindFirstChild("ShotMessage") then
m = Instance.new("Message", workspace)
m.Name = "ShotMessage"
for i = 1, #Messages do
m.Text = Messages[i]
wait(5)
end
m:Remove()
end end)
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
11 Aug 2011 09:55 AM
@huner:

That seems to work fine for me. Check that there isn't already a message called "ShotMessage" in the workspace before running it.
Report Abuse
huner2 is not online. huner2
Joined: 27 Apr 2008
Total Posts: 1681
11 Aug 2011 09:56 AM
Ok
Report Abuse
huner2 is not online. huner2
Joined: 27 Apr 2008
Total Posts: 1681
11 Aug 2011 09:57 AM
Ummm no there's no ShotMessage in the workspace.
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
11 Aug 2011 10:00 AM
Then it should work. Are you sure you're running it right? In roblox studio, testing in Play Solo?
Report Abuse
huner2 is not online. huner2
Joined: 27 Apr 2008
Total Posts: 1681
11 Aug 2011 10:02 AM
I'm in regular ROBLOX I put the script in the brick and save,then I shoot it in play mode and nothing happens.I don't know if that is running it right or not.
Report Abuse
aventuras is not online. aventuras
Joined: 28 Dec 2007
Total Posts: 77
11 Aug 2011 10:02 AM
model = script.Parent.Parent.Parent.Remover

upgradeStuff = model:clone()

model:remove()

local ting = 0

function onClicked()
if ting == 0 then
ting = 1

upgradeStuff.Parent = script.Parent.Parent.Parent
wait(2)

script.Parent.Parent.Parent.Remover:remove()

script.Parent.Parent.Name = "Reloading Unjammer"
wait(120)
script.Parent.Parent.Name = "Unjam Conveyor Belts"

ting = 0
end
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)

------------------------------------------------------------------------------------------

I used a tycoon script and changed it to fit my needs. Everything works the first time clicking the button (model is removed at start of game, model is spawned when clicked, name of model is changed). But, every other time that i try to click the button, the brick never spawns. After doing some observations, i noticed that after clicking on the model the 2nd+ time, the model is spawned but it is completely empty. The brick that i need to spawn never spawns again...

Thanks
Report Abuse
Starryguy is not online. Starryguy
Joined: 07 Dec 2009
Total Posts: 95
11 Aug 2011 10:04 AM
door=script.Parent.Parent.door //Sets the door shortcut
game.Workspace.Part.Touched:connect(function(hit) //Checks if hit
if hit.Parent:FindFirstChild("Humanoid") ~= nil then //Checks if humanoid
door.CanCollide=false //Makes it so it can slide properly
door.BodyPosition.position=door.PosOpen.Value //Makes it slide (PosOpen = open position)
wait(2)//Waits for door to slide
door.CanCollide=true //Makes it so people can not walk through the door
for i=1, 18 do
door.BodyPosition.position=door.PosOpen.Value
wait(1)
end
door.CanCollide=false //Makes it so it can slide properly
door.BodyPosition.position=door.PosClosed.Value //Closes the door
wait(2)
door.CanCollide=true
end
end)
No error info in output
Report Abuse
huner2 is not online. huner2
Joined: 27 Apr 2008
Total Posts: 1681
11 Aug 2011 10:05 AM
Ummm are the / supposed to be there?
Report Abuse
Starryguy is not online. Starryguy
Joined: 07 Dec 2009
Total Posts: 95
11 Aug 2011 10:07 AM
DOH, they are suppost to be -- (Noted it on forum)
Report Abuse
huner2 is not online. huner2
Joined: 27 Apr 2008
Total Posts: 1681
11 Aug 2011 10:08 AM
lol nice..
Report Abuse
Previous Thread :: Next Thread 
Page 4 of 7Go to page: 1, 2, 3, 4, 5 ... 6, 7 Prev Next
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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