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: Local script wont work on a server.

Previous Thread :: Next Thread 
noobkiller878 is not online. noobkiller878
Joined: 22 Dec 2008
Total Posts: 1465
01 Jan 2013 03:32 AM
Erm. It's a basic [local] script. It works perfectly when testing solo. Yet when I play it on an actual server, it does nothing. I'm sure you master scripters have a reason why.

HeadCam=script.Parent.HeadCamera
Char = script.Parent.Parent.Parent.Parent.Name

function Camera()
if HeadCam.Value==1 then
workspace.CurrentCamera.CameraSubject = game.Workspace[Char].Head
workspace.CurrentCamera.CameraType = "Follow"
for i = 0.6, 0, -0.01 do
wait(0.02)
script.Parent.Parent.Parent.Start.Music.Volume=i
end
script.Parent.Parent.Parent.Start.Music:Stop()
HeadCam.Value=0
end
end
script.Parent.HeadCamera.Changed:connect(Camera)
Report Abuse
noobkiller878 is not online. noobkiller878
Joined: 22 Dec 2008
Total Posts: 1465
01 Jan 2013 04:38 AM
...?
Report Abuse
ninja5566 is not online. ninja5566
Joined: 14 Jan 2009
Total Posts: 5233
01 Jan 2013 04:41 AM
Add a wait() to the top?
Report Abuse
noobkiller878 is not online. noobkiller878
Joined: 22 Dec 2008
Total Posts: 1465
01 Jan 2013 04:54 AM
That's not it actually. The WHOLE script (207 lines of it,) is not working. Luckily I only focus on one of the four functions. I don't see why it wouldn't work in a real server...

Char = script.Parent.Parent.Parent.Parent.Name
HeadCam=script.Parent.HeadCamera
function Warrior()
Data = script.Parent.Parent.Parent.Chosen
Data.Team.Class.Value=1
Data.Value=1


if Data.Team.Value==2 then
for Index, Child in pairs(game.Workspace[Char]:GetChildren()) do
if Child:IsA("CharacterMesh") then
Child:Remove()
end
if Child:IsA("Hat") then
Child:Remove()
end
end
for Index, Child in pairs(Game.Workspace.ArmorSets.Dantwae.Iron:GetChildren()) do
Child:Clone().Parent = game.Workspace[Char]
end
Data.Parent.PlyrLead.Bg.Visible=true
Data.Parent.PlyrLead.PlayerInfo.Visible=true
game.Workspace[Char].Torso.CFrame = CFrame.new(-418.5, 123.8, 42.5)
HeadCam.Value=1
end

wait(0.5)
script.Parent.Visible=false
end
script.Parent.Warrior.MouseButton1Click:connect(Warrior)
Report Abuse
IamAwesome777 is not online. IamAwesome777
Joined: 18 Jul 2011
Total Posts: 2640
01 Jan 2013 05:00 AM
char = game.Players.LocalPlayer

What is HeadCamera?
Report Abuse
yomamadude6 is not online. yomamadude6
Joined: 21 Nov 2009
Total Posts: 2151
01 Jan 2013 05:19 AM
add wait() at the beginning of the script. it should be the first fix you try if something doesn't work online.
Report Abuse
OmgFlyingSpaceCow is not online. OmgFlyingSpaceCow
Joined: 16 Dec 2009
Total Posts: 564
01 Jan 2013 05:30 AM
http://www.roblox.com/User.aspx?ID=36354257
Don't shoot him.
Report Abuse
noobkiller878 is not online. noobkiller878
Joined: 22 Dec 2008
Total Posts: 1465
01 Jan 2013 06:16 AM
Tried all of the ideas. None worked. What's up with it?
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