Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Script works in studio-solo, and in build, but doesn't work in actual game....?

Asked by
ere376 0
9 years ago

game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) I = Instance.new("NumberValue") I.Name = "Position" I.Parent = player.Character wait(3) local shirt=player.Character:findFirstChild("Shirt") local pant=player.Character:findFirstChild("Pants") --local shirt=s:clone() --local pant=p:clone() --p:remove() --s:remove() local jump=Instance.new("Animation") jump.AnimationId = "http://www.roblox.com/Asset?ID=168805279" local animTrack = player.Character.Humanoid:LoadAnimation(jump) if player:IsInGroup(1129497)then if player:GetRankInGroup(1129497) == 240 then animTrack:Play() pant.PantsTemplate="http://www.roblox.com/asset/?id=165541507" shirt.ShirtTemplate="http://www.roblox.com/asset/?id=165541475" end if player:GetRankInGroup(1129497) == 241 then animTrack:Play() pant.PantsTemplate="http://www.roblox.com/asset/?id=165541507" shirt.ShirtTemplate="http://www.roblox.com/asset/?id=165541475" end if player:GetRankInGroup(1129497) >= 250 then animTrack:Play() pant.PantsTemplate="http://www.roblox.com/asset/?id=168791583" shirt.ShirtTemplate="http://www.roblox.com/asset/?id=168791496" end if player:GetRankInGroup(1129497) == 230 then animTrack:Play() pant.PantsTemplate="http://www.roblox.com/asset/?id=168791646" shirt.ShirtTemplate="http://www.roblox.com/asset/?id=168791526" end if player:GetRankInGroup(1129497) == 120 then animTrack:Play() pant.PantsTemplate="http://www.roblox.com/asset/?id=168791646" shirt.ShirtTemplate="http://www.roblox.com/asset/?id=168791526" end if player:GetRankInGroup(1129497) == 2 then animTrack:Play() pant.PantsTemplate="http://www.roblox.com/asset/?id=168791668" shirt.ShirtTemplate="http://www.roblox.com/asset/?id=168791557" end if player:GetRankInGroup(1129497) == 1 then animTrack:Play() pant.PantsTemplate="http://www.roblox.com/asset/?id=168791668" shirt.ShirtTemplate="http://www.roblox.com/asset/?id=168791557" end else animTrack:Play() pant.PantsTemplate="http://www.roblox.com/asset/?id=168791668" shirt.ShirtTemplate="http://www.roblox.com/asset/?id=168791557" end hat = Instance.new("Hat") part = Instance.new("Part") hat.Name = "Futuristic 12" part.Parent = hat part.Position = player.Character:findFirstChild("Head").Position part.Name = "Handle" part.formFactor = 0 part.Size = Vector3.new(-0,-0,-1) part.BottomSurface = 0 part.TopSurface = 0 part.Locked = true game.ServerStorage.Smuggler.Mesh:clone().Parent = part hat.Parent = player.Character hat.AttachmentPos = Vector3.new(0,0.78,0.425) end) end)

i need it for a group place im working on, i works perfectly in solo gives the "position" number value, creates my hat, changes the shirts and pants, and runs my animation, but when on the server it only add position value and hat.... nothing else works... help? theres other scripts that are the same, work in solo but not in public... i dont know what im doing wrong

2 answers

Log in to vote
0
Answered by 9 years ago

Make sure the script is RUNNING in public mode, that may be the problem it can't run or the script should be in a LOCAL script.

Ad
Log in to vote
-1
Answered by 9 years ago

This happens to me soemtimes. I just take the code and put them in seperate scripts

0
No need for bold, son. OniiCh_n 410 — 9y

Answer this question