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 is being very very odd in server mode

Previous Thread :: Next Thread 
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
08 Dec 2015 05:53 PM
this is the code, it is a serverscript which welds guns when equipped and the c0 is set by a table

local motor1 = character:WaitForChild("Torso"):WaitForChild("Right Shoulder")
local motor2 = character.Torso:WaitForChild("Left Shoulder")
local welda = Instance.new("Weld")
welda.Parent = nil
welda.Part0 = character.Torso
welda.Part1 = character:WaitForChild("Right Arm")
local weldb = Instance.new("Weld")
weldb.Parent = nil
weldb.Part0 = character.Torso
weldb.Part1 = character:WaitForChild("Left Arm")
for i = 1, #guns do
local clone = guns[i]:Clone()
clone.Parent = player.Backpack
clone.Unequipped:connect(function()
welda.Parent = nil
weldb.Parent = nil
motor1.Parent = character.Torso
motor2.Parent = character.Torso
end)
clone.Equipped:connect(function()
motor1.Parent = nil
welda.Parent = character.Torso
welda.C0 = welds[guns[i].Name][1]
if welds[guns[i].Name][2] then
weldb.Parent = character.Torso
weldb.C0 = welds[guns[i].Name][2]
end
end)
end

now this is how it should be working: gyazo.com/56b9564b420841a1a0056c51c34033ef

however in server mode it goes cra: gyazo.com/2dae1fef26418e6daffc1def7e7c8d44

it acts like parts of the tool are missing or something, the scripts dont even run

it only works switching from nothing to gun, and completely breaks from gun to gun

i've tried a lot of things but nothing has yet to work, last resort right here

please help

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
08 Dec 2015 05:57 PM
i'd love you to death if you could figure it out

not even rayk sensei could do it

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
wonderful72pike is not online. wonderful72pike
Joined: 13 Jul 2010
Total Posts: 7009
08 Dec 2015 05:59 PM
Check the Explorer in Server Mode to see what's physically going on, this doesn't quite look like something troubleshooting the script can help with.
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
08 Dec 2015 06:19 PM
checked explorer, rightweld seems to not be forming on switch and every time the tool has only like certain parts of the original, works perfect on nothing -> gun though

im literally clueless as to why this is happening

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
08 Dec 2015 06:32 PM
raise the roof

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
08 Dec 2015 06:55 PM
bump

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
rvox is not online. rvox
Joined: 18 Feb 2011
Total Posts: 5380
08 Dec 2015 07:06 PM
Most likely because when you switch between two tools, it'll trigger both events, causing some stuff like parenting to nil and then parenting back to the torso immediately

you need like some sort of debounce
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
08 Dec 2015 07:09 PM
yeah but the issue isnt with the motors not with the welds

its with the right grip

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
08 Dec 2015 07:23 PM
ayy

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
DermonDarble is not online. DermonDarble
Joined: 04 Jun 2015
Total Posts: 2576
08 Dec 2015 08:21 PM
Instead of parenting the welds to nil, try just setting their part1 to nil

CAT BISQUE
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
09 Dec 2015 06:54 PM
will attempt that

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
09 Dec 2015 07:02 PM
local motor1 = character:WaitForChild("Torso"):WaitForChild("Right Shoulder")
local motor2 = character.Torso:WaitForChild("Left Shoulder")
local welda = Instance.new("Weld")
welda.Parent = character.Torso
welda.Part0 = character.Torso
welda.Part1 = nil
local weldb = Instance.new("Weld")
weldb.Parent = character.Torso
weldb.Part0 = character.Torso
weldb.Part1 = nil
for i = 1, #guns do
local clone = guns[i]:Clone()
clone.Parent = player.Backpack
clone.Unequipped:connect(function()
welda.Part1 = nil
weldb.Part1 = nil
motor1.Parent = character.Torso
motor2.Parent = character.Torso
end)
clone.Equipped:connect(function()
motor1.Parent = nil
welda.Part1 = character["Right Arm"]
welda.C0 = welds[guns[i].Name][1]
if welds[guns[i].Name][2] then
weldb.Part1 = character["Left Arm"]
weldb.C0 = welds[guns[i].Name][2]
end
end)
end

still not working

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
09 Dec 2015 07:19 PM
les scripters cannot help me d;

this is above most of their paygrade apparently

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
09 Dec 2015 07:22 PM
jk bb <3 everyone in this subforum

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
09 Dec 2015 08:05 PM
bum

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
epicface123321177 is not online. epicface123321177
Joined: 23 Jul 2012
Total Posts: 514
09 Dec 2015 08:14 PM
-50 bumps later-
still no answer.
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
10 Dec 2015 07:57 AM
preach

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
10 Dec 2015 06:00 PM
ive been stuck on this for years

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
nox7 is not online. nox7
Joined: 29 Aug 2008
Total Posts: 27467
10 Dec 2015 06:26 PM
This doesn't appear to be an issue with your script. You have some weird set up where you're using a server script to add and control two different concepts of the client and server replication. That just seems dangerous.

The reason it works fine in solo is because there is no server and no replication. Your issue is 99% stemming from the weld having to work on both the server and the client - which isn't even supported in the API.

You need to rethink your welding solution.
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
10 Dec 2015 06:28 PM
hmph

any idea what welding solution would be better?

im not having creativity rn

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
nox7 is not online. nox7
Joined: 29 Aug 2008
Total Posts: 27467
10 Dec 2015 06:29 PM
I'm confused as to why you made it on the server in the first place. Understanding your reason would be better.
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
10 Dec 2015 06:30 PM
welds created locally are wonky if i'm not mistaken

its FE

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
nox7 is not online. nox7
Joined: 29 Aug 2008
Total Posts: 27467
10 Dec 2015 06:36 PM
Orite

FE. Didn't know you had that enabled. I've not worked with them with FilteringEnabled on. That makes your problem a bit more difficult. I wish I could explain, but I simply do not know how their mechanics filter.

Try Studio Settings->Network->PrintFilters to see if that helps. I'm going to run some tests.
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
10 Dec 2015 06:54 PM
alright thanks

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
11 Dec 2015 09:13 PM
bump

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
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