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: script works in test, but not in server

Previous Thread :: Next Thread 
Plasmaa is not online. Plasmaa
Joined: 10 Jan 2013
Total Posts: 31
26 Jun 2017 01:47 PM
Relatively new scripter here, and I have a script that I made that seems to work when I test it in studio, but not when I use a server.

If you don't recognize some of the values(ex. class) I separately inserted them via. a different script(they all work fine, I doubt they're the problem)

Here's the script.

player=game.Players.LocalPlayer
Mouse=player:GetMouse()
sorcqenabled=true
Mouse.KeyDown:connect(function(Key)
Ke###############i###ey == 'q' then
if player.Class.Value=="Sorcerer" and sorcqenabled==true then
x=Instance.new("Part")
x.Parent=game.Workspace
x.CFrame=player.Character.Torso.CFrame * CFrame.new(0, 5, 0)
x.Shape="Ball"
x.TopSurface="Smooth"
x.BottomSurface="Smooth"
x.Size=Vector3.new(3, 3, 3)
x.BrickColor=BrickColor.new("Really blue")
x.Transparency=0.2
c=Instance.new("BodyVelocity")
c.Parent=x
c.velocity = x.CFrame.lookVector * 90
c.MaxForce=Vector3.new(math.huge, math.huge, math.huge)
player.CurrentMana.Value=player.CurrentMana.Value-20
sorcqenabled=false
x.Anchored=true
player.Character.Torso.Anchored=true
for i=0.1, 10 do
x.############################### wait(0.1)
end
x.Anchored=false
player.Character.Torso.Anchored=false
wait(0.5)
local dmg = game.ServerStorage.sorcwaterdmg:Clone()
dmg.Parent=x
wait(3)
sorcqenabled=true

In test, you will be anchored in place, the ball will grow, and you will shoot it, and it will explode when it touches something(the cloned "sorcwaterdmg" script does that. In a server, it does not grow or anchor you, it just shoots out with its original size above your head with no cooldown, and the script isn't cloned.
Report Abuse
Plasmaa is not online. Plasmaa
Joined: 10 Jan 2013
Total Posts: 31
26 Jun 2017 01:50 PM
Sorry for tags, first tags makes sure key is q, works, second tags adds i to the x, y, and z values of the sphere.
Report Abuse
ReaIG is not online. ReaIG
Joined: 10 Apr 2017
Total Posts: 4021
26 Jun 2017 01:56 PM
damn
Report Abuse
acoo250 is not online. acoo250
Joined: 31 Dec 2012
Total Posts: 407
26 Jun 2017 02:45 PM
ROBLOX discontinued "Keydown" ############################################################## but try and add a wait(1.5) at the beginning
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