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
 

Re: This script is not working.

Previous Thread :: Next Thread 
whatname is not online. whatname
Joined: 05 Apr 2008
Total Posts: 144
19 Feb 2012 02:41 AM
I have a script where you click a brick, it teleports under the map, makes a figure disappear, and gived you 10 money. The script works perfectly in play solo or test mode but once I go into regular play mode it doesn't. Here it is.

local cost = 10

local ting = 0

function onClicked()
if ting == 0 then
local character = game.Workspace.Player
local player = game.Players:GetPlayerFromCharacter(character)

if player then
print("Player exists")
else
print("Player does not exist")
end
local user = game.Players:GetPlayerFromCharacter(character)
if user then
print("Hello World")
local stats = user:findFirstChild("leaderstats")
if stats then
ting = 1
local cash = stats:findFirstChild("Money")
if cash.Value >= 0 then
cash.Value = cash.Value + cost
end
end

ting = 0
end
end

script.Parent.Position = Vector3.new(-13.9, 0, -18)
game.Workspace.Person.Head.Transparency = 1
game.Workspace.Person.LeftArm.Transparency = 1
game.Workspace.Person.LeftLeg.Transparency = 1
game.Workspace.Person.RightArm.Transparency = 1
game.Workspace.Person.RightLeg.Transparency = 1
game.Workspace.Person.Torso.Transparency = 1
wait(10)
game.Workspace.Person.Head.Transparency = 0
game.Workspace.Person.LeftArm.Transparency = 0
game.Workspace.Person.LeftLeg.Transparency = 0
game.Workspace.Person.RightArm.Transparency = 0
game.Workspace.Person.RightLeg.Transparency = 0
game.Workspace.Person.Torso.Transparency = 0
script.Parent.Position = Vector3.new(-13.9, 74.1, -18)
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)
Report Abuse
Cheater is not online. Cheater
Joined: 29 Jun 2007
Total Posts: 5258
19 Feb 2012 03:51 AM
You use Player as the only one, that's the Problem. In Build Solo you only play as a player named Player. Online, not everyone is named Player. That's why it doesn't work. I'll make a tiny comment so you see where.



local cost = 10

local ting = 0

function onClicked()
if ting == 0 then
local character = game.Workspace.Player --Right here.
local player = game.Players:GetPlayerFromCharacter(character)

if player then
print("Player exists")
else
print("Player does not exist")
end
local user = game.Players:GetPlayerFromCharacter(character)
if user then
print("Hello World")
local stats = user:findFirstChild("leaderstats")
if stats then
ting = 1
local cash = stats:findFirstChild("Money")
if cash.Value >= 0 then
cash.Value = cash.Value + cost
end
end

ting = 0
end
end

script.Parent.Position = Vector3.new(-13.9, 0, -18)
game.Workspace.Person.Head.Transparency = 1
game.Workspace.Person.LeftArm.Transparency = 1
game.Workspace.Person.LeftLeg.Transparency = 1
game.Workspace.Person.RightArm.Transparency = 1
game.Workspace.Person.RightLeg.Transparency = 1
game.Workspace.Person.Torso.Transparency = 1
wait(10)
game.Workspace.Person.Head.Transparency = 0
game.Workspace.Person.LeftArm.Transparency = 0
game.Workspace.Person.LeftLeg.Transparency = 0
game.Workspace.Person.RightArm.Transparency = 0
game.Workspace.Person.RightLeg.Transparency = 0
game.Workspace.Person.Torso.Transparency = 0
script.Parent.Position = Vector3.new(-13.9, 74.1, -18)
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)
Report Abuse
Cheater is not online. Cheater
Joined: 29 Jun 2007
Total Posts: 5258
19 Feb 2012 03:53 AM
Use this version, I'm not sure if everything works because I didn't check the whole script, I'm also not sure if it works same as .Touched. Just trying:




local cost = 10

local ting = 0

function onClicked(click)
if ting == 0 then
local character = game.Workspace.click.Parent
local player = game.Players:GetPlayerFromCharacter(character)

if player then
print("Player exists")
else
print("Player does not exist")
end
local user = game.Players:GetPlayerFromCharacter(character)
if user then
print("Hello World")
local stats = user:findFirstChild("leaderstats")
if stats then
ting = 1
local cash = stats:findFirstChild("Money")
if cash.Value >= 0 then
cash.Value = cash.Value + cost
end
end

ting = 0
end
end

script.Parent.Position = Vector3.new(-13.9, 0, -18)
game.Workspace.Person.Head.Transparency = 1
game.Workspace.Person.LeftArm.Transparency = 1
game.Workspace.Person.LeftLeg.Transparency = 1
game.Workspace.Person.RightArm.Transparency = 1
game.Workspace.Person.RightLeg.Transparency = 1
game.Workspace.Person.Torso.Transparency = 1
wait(10)
game.Workspace.Person.Head.Transparency = 0
game.Workspace.Person.LeftArm.Transparency = 0
game.Workspace.Person.LeftLeg.Transparency = 0
game.Workspace.Person.RightArm.Transparency = 0
game.Workspace.Person.RightLeg.Transparency = 0
game.Workspace.Person.Torso.Transparency = 0
script.Parent.Position = Vector3.new(-13.9, 74.1, -18)
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)
Report Abuse
whatname is not online. whatname
Joined: 05 Apr 2008
Total Posts: 144
19 Feb 2012 10:36 AM
Ok I will try those scripts.
Report Abuse
whatname is not online. whatname
Joined: 05 Apr 2008
Total Posts: 144
19 Feb 2012 11:05 AM
OK I sort of got something going. It's saying that user is a nil value on line 12.

local cost = 10

local ting = 0

function onClicked()

if ting == 0 then
local user = game.Players:GetPlayerFromCharacter(character)
if user then
else print(Why)

local stats = user:findFirstChild("leaderstats")
if stats then
else print(How)
ting = 1
local cash = stats:findFirstChild("Money")
if cash.Value >= 0 then
cash.Value = cash.Value + cost
end
end
print(3)
ting = 0
end
end

script.Parent.Position = Vector3.new(-13.9, 0, -18)
game.Workspace.Person.Head.Transparency = 1
game.Workspace.Person.LeftArm.Transparency = 1
game.Workspace.Person.LeftLeg.Transparency = 1
game.Workspace.Person.RightArm.Transparency = 1
game.Workspace.Person.RightLeg.Transparency = 1
game.Workspace.Person.Torso.Transparency = 1
wait(10)
game.Workspace.Person.Head.Transparency = 0
game.Workspace.Person.LeftArm.Transparency = 0
game.Workspace.Person.LeftLeg.Transparency = 0
game.Workspace.Person.RightArm.Transparency = 0
game.Workspace.Person.RightLeg.Transparency = 0
game.Workspace.Person.Torso.Transparency = 0
script.Parent.Position = Vector3.new(-13.9, 74.1, -18)
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)
Report Abuse
sis533 is not online. sis533
Joined: 23 May 2011
Total Posts: 32
19 Feb 2012 11:49 AM
It not working?
Try this!

function on 0 ()
then 5.0 (scripting function test)
Print(2)
end
end

script.workspace.head.Transparency=0
game.workspace.explore.sript.head.transparenty=1
game.workspace.explore.script.body.transparenty=5
wait (10)

game.script.functions.cheat.bot
game.bot.helper.script.propersition=8
game.sripted.cheat.engine.decoding=100
game.admin.workspace.explore.admin in
wait (at least 5 or 7)

stats=1/2
local stats=96%
game=script
print(3)
user then click propersition(in edit mode)
end
end
end

Vector rotate3.new.adminscripts.(-12.9,63.5,-20)
Script.parent.brick.workspace.edit.type
then 1 click brick type
end
end
end
end

ClickDecode.MouseClick:connect(user on clicked net)

There you go 3in one!
Script help
Cheat engin
Admin helper botion

Still can't find what your looking for?
Or this connection failed?
Maybe even didn't decode?
Message sis533 for more help and answers.
She will tell you anyhting you want to know from new members to admin.'Anything at all'
Report Abuse
rangersmash is not online. rangersmash
Joined: 18 Nov 2009
Total Posts: 2891
19 Feb 2012 11:52 AM
[ Content Deleted ]
Report Abuse
rangersmash is not online. rangersmash
Joined: 18 Nov 2009
Total Posts: 2891
19 Feb 2012 11:55 AM
[ Content Deleted ]
Report Abuse
whatname is not online. whatname
Joined: 05 Apr 2008
Total Posts: 144
19 Feb 2012 12:45 PM
thanks
Report Abuse
sis533 is not online. sis533
Joined: 23 May 2011
Total Posts: 32
20 Feb 2012 12:29 PM
Umm no it works I tryed it even ask people that it works for like........eyecandy34........sis35.........sis53.......sneekygirl9.....and firstaccoutn1 and other poeple :\ so ay ahha
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
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