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: Test Solo to Game Servers

Previous Thread :: Next Thread 
Raphael7 is not online. Raphael7
Joined: 03 Dec 2008
Total Posts: 2479
25 Nov 2012 09:49 PM
How come my script only works on Play Solo not on Test Server or Game Servers. No output errors or anything. Is there anyway to fix this? Or what could be the problem?
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
25 Nov 2012 09:50 PM
Change script type(Normal to Local or Local to Normal).

Want a script? Send me a PM and we'll work out a deal!
Report Abuse
buddy249950 is not online. buddy249950
Joined: 30 Jun 2016
Total Posts: 3536
25 Nov 2012 09:50 PM
How would we know the problem if you didn't show us the script?
Report Abuse
Raphael7 is not online. Raphael7
Joined: 03 Dec 2008
Total Posts: 2479
25 Nov 2012 09:52 PM
I have the script working alright. It works on Solo, it doesn't need any debugs. I just need to know why it does not work on Game Server.

Also, I'll try it out LocalScript.
Report Abuse
Aerideyn is not online. Aerideyn
Joined: 16 Jan 2010
Total Posts: 1882
25 Nov 2012 09:55 PM
Because you didn't put enough butter on your toast.

Honestly how do you expect us to know? There a literally hundreds of possibilities.
Show us the script.

Report Abuse
Raphael7 is not online. Raphael7
Joined: 03 Dec 2008
Total Posts: 2479
25 Nov 2012 10:00 PM
vTool=script.Parent;
Handle=vTool.Handle;
Blade=vTool.Blade1;
Blade2=vTool.Blade2;
Sheath1=vTool.Sheath1;
Sheath2=vTool.Sheath2;
running=script.Parent.Running;
dmg=script.Parent.Damage;
unsheath=script.Parent.Sheath;
debounce=false
attacking=script.Parent.Attacking;
attacking2=script.Parent.Attacking2;

--[[--------------------------------------------------]]--

debugs=function()

if vTool.Parent.className=="Model" then return end
wait()
vCharacter=vTool.Parent.Parent.Character
vTorso=vCharacter.Torso
vHumanoid=vCharacter.Humanoid
FakeLS=vTorso.FakeLS
FakeRS=vTorso.FakeRS

FakeLS.C0=CFrame.new(-1, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
FakeRS.C0=CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
Blade.Weld.C0=Blade.Weld.C0*CFrame.new(0,0,0)
Blade2.Weld.C0=Blade2.Weld.C0*CFrame.new(0,0,0)

end

--[[--------------------------------------------------]]--

Unsheath=function()
if vTool.Parent.className=="Backpack" then return end

vCharacter=vTool.Parent
vTorso=vCharacter.Torso
FakeLS=vTorso.FakeLS
FakeRS=vTorso.FakeRS

for i=.1,5 do
wait(.01)
FakeLS.C0=FakeLS.C0*CFrame.Angles(-.05,0,0)
FakeRS.C0=FakeRS.C0*CFrame.Angles(-.05,0,0)
Blade.Weld.C0=Blade.Weld.C0*CFrame.new(0,0,.20)
Blade2.Weld.C0=Blade2.Weld.C0*CFrame.new(0,0,.20)
end
end

--[[--------------------------------------------------]]--

Sheath=function()

if vTool.Parent.className=="Backpack" then return end

vCharacter=vTool.Parent
vTorso=vCharacter.Torso
FakeLS=vTorso.FakeLS
FakeRS=vTorso.FakeRS

for i=.1,5 do
wait(.01)
FakeLS.C0=FakeLS.C0*CFrame.Angles(.05,0,0)
FakeRS.C0=FakeRS.C0*CFrame.Angles(.05,0,0)
Blade.Weld.C0=Blade.Weld.C0*CFrame.new(0,0,-.20)
Blade2.Weld.C0=Blade2.Weld.C0*CFrame.new(0,0,-.20)
end
end

--[[--------------------------------------------------]]--

Attack_1=function()
if unsheath.Value==true then
if vTool.Parent.className=="Backpack" then return end

if attacking.Value==false then
attacking.Value=true
wait()
vCharacter=vTool.Parent
vTorso=vCharacter.Torso
FakeLS=vTorso.FakeLS
FakeRS=vTorso.FakeRS

dmg.Value=10

Blade2.CanCollide=true

Blade2.Touched:connect(function(hit)
if hit.Parent:findFirstChild("Humanoid") then
h=hit.Parent.Humanoid
h:TakeDamage(dmg.Value)
end
end)

for i=.1,5 do
wait(.01)
FakeLS.C0=FakeLS.C0*CFrame.Angles(0,0,-.3)
FakeRS.C0=FakeRS.C0*CFrame.Angles(0,0,0)
Blade.Weld.C0=Blade.Weld.C0*CFrame.new(0,0,0)
Blade2.Weld.C0=Blade2.Weld.C0*CFrame.new(0,0,0)
end
end
end
end

--[[--------------------------------------------------]]--

Attack_2=function()
if unsheath.Value==true then
if vTool.Parent.className=="Backpack" then return end
if attacking2.Value==false then
attacking2.Value=true
wait()
vCharacter=vTool.Parent
vTorso=vCharacter.Torso
FakeLS=vTorso.FakeLS
FakeRS=vTorso.FakeRS

dmg.Value=10

Blade.CanCollide=true

Blade.Touched:connect(function(hit)
if hit.Parent:findFirstChild("Humanoid") then
h=hit.Parent.Humanoid
h:TakeDamage(dmg.Value)
end
end)

for i=.1,5 do
wait(.01)
FakeLS.C0=FakeLS.C0*CFrame.Angles(0,0,0)
FakeRS.C0=FakeRS.C0*CFrame.Angles(0,0,.3)
Blade.Weld.C0=Blade.Weld.C0*CFrame.new(0,0,0)
Blade2.Weld.C0=Blade2.Weld.C0*CFrame.new(0,0,0)
end
end
end
end

--[[--------------------------------------------------]]--

Run=function()
if unsheath.Value==true then
if script.Parent.className=="Backpack" then return end
if running.Value==false then
wait()
print("Running")

running.Value=true
vCharacter=vTool.Parent
vTorso=vCharacter.Torso
vHumanoid=vCharacter.Humanoid

vHumanoid.WalkSpeed=30
end
end
end

--[[--------------------------------------------------]]--

ReturnRun=function()

if script.Parent.className=="Backpack" then
vCharacter=vTool.Parent.Parent.Character
vTorso=vCharacter.Torso
vHumanoid=vCharacter.Humanoid

vHumanoid.WalkSpeed=16
end

if running.Value==true then
wait()
print("Return Run")

running.Value=false
vCharacter=vTool.Parent
vTorso=vCharacter.Torso
vHumanoid=vCharacter.Humanoid

vHumanoid.WalkSpeed=16
end
end

--[[--------------------------------------------------]]--

ReturnAttack_1=function()
if vTool.Parent.className=="Backpack" then return end
if attacking.Value==true then
attacking.Value=false
wait()
vCharacter=vTool.Parent
vTorso=vCharacter.Torso
FakeLS=vTorso.FakeLS
FakeRS=vTorso.FakeRS

dmg.Value=0

Blade2.CanCollide=false

Blade2.Touched:connect(function(hit)
if hit.Parent:findFirstChild("Humanoid") then
h=hit.Parent.Humanoid
h:TakeDamage(dmg.Value)
end
end)

for i=.1,5 do
wait(.01)
FakeLS.C0=FakeLS.C0*CFrame.Angles(0,0,.3)
FakeRS.C0=FakeRS.C0*CFrame.Angles(0,0,0)
Blade.Weld.C0=Blade.Weld.C0*CFrame.new(0,0,0)
Blade2.Weld.C0=Blade2.Weld.C0*CFrame.new(0,0,0)
end
end
end

--[[--------------------------------------------------]]--

ReturnAttack_2=function()
if vTool.Parent.className=="Backpack" then return end
if attacking2.Value==true then
attacking2.Value=false
wait()
vCharacter=vTool.Parent
vTorso=vCharacter.Torso
FakeLS=vTorso.FakeLS
FakeRS=vTorso.FakeRS

dmg.Value=0

Blade.CanCollide=false

Blade.Touched:connect(function(hit)
if hit.Parent:findFirstChild("Humanoid") then
h=hit.Parent.Humanoid
h:TakeDamage(dmg.Value)
end
end)

for i=.1,5 do
wait(.01)
FakeLS.C0=FakeLS.C0*CFrame.Angles(0,0,0)
FakeRS.C0=FakeRS.C0*CFrame.Angles(0,0,-.3)
Blade.Weld.C0=Blade.Weld.C0*CFrame.new(0,0,0)
Blade2.Weld.C0=Blade2.Weld.C0*CFrame.new(0,0,0)
end
end
end

--[[--------------------------------------------------]]--

NCL=vTool:clone()

Fix=function()

NEW=NCL:clone()
NEW.Parent=game.Players:GetPlayerFromCharacter(vTool.Parent).Backpack
vTool.Parent=NEW.Parent
wait(.25)
vTool.Parent=nil
end

--[[--------------------------------------------------]]--

lastdown=time()
adb=true
KeyDown=function(key)

key=string.lower(key)

if key=="f" then
if time()-lastdown<.2 then
Fix()
end
end

if not adb then return end
adb=false

if key=="r" then
print("Key:r")
Run()
end

if key=="q" then
print("Key: q")
Attack_1()
end

if key=="e" then
print("Key: e")
Attack_2()
end
wait()
adb=true
lastdown=time()
end

--[[--------------------------------------------------]]--
db=false
KeyUp=function(key)
key=string.lower(key)
if debounce then return end
debounce=true

if key=="r" then
print("Key released: r")
ReturnRun()
end

if key=="q" then
print("Key released: q")
ReturnAttack_1()
end

if key=="e" then
print("Key released: e")
ReturnAttack_2()
end
wait()
debounce=false
end

--[[--------------------------------------------------]]--

ButtonUp=function()

if unsheath.Value==true then
unsheath.Value=false
Sheath()
end

end

--[[--------------------------------------------------]]--

ButtonDown=function(mouse)

if unsheath.Value==false then
unsheath.Value=true
Unsheath()
end

end

--[[--------------------------------------------------]]--


vTool.Equipped:connect(function(mouse)
wait()
script.Parent.Equip.Value=true
mouse.Button1Down:connect(ButtonDown)
mouse.Button1Up:connect(ButtonUp)
mouse.KeyDown:connect(KeyDown)
mouse.KeyUp:connect(KeyUp)
wait()

end)

--[[--------------------------------------------------]]--

vTool.Unequipped:connect(function(mouse)
script.Parent.Equip.Value=false
debugs()
end)
Report Abuse
Aerideyn is not online. Aerideyn
Joined: 16 Jan 2010
Total Posts: 1882
25 Nov 2012 10:06 PM
Ok some common situations to watch for.

In a server remember sometimes things take a while to load - a few seconds easily and if your script decides to run early before the rest of your (tool/model/game whatever) has it can try to reference things which don't exist yet.

This is especially common with local scripts and the player's Character.


In any case you need to help us before we can help you.

First of all define not working.

Any errors?
Does it just outright not do anything?
Does it instead only do some - things? or something completely unrelated?

have you tried following it's execution by planting print's around and isolating where it has gone wrong?

Any other information that you think could help?
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