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

Why does this script only work inside roblox studio but not the actual game?

Asked by 5 years ago

local tool = script.Parent local handle = tool.Handle local player = game.Players.LocalPlayer local Character = player.Character local model = game.Workspace tool.Activated:connect(function() for i, v in pairs(Character:GetChildren()) do if v:IsA("BasePart") and v.Name ~= 'HumanoidRootPart' then v.Transparency = 0.5 tool.Unequipped:connect(function() for i, v in pairs(model:GetChildren()) do if v.Name == "Part" then v.Transparency = 0 v.CanCollide = true end end end) end end end) tool.Deactivated:connect(function() for i, v in pairs(Character:GetChildren()) do if v:IsA("BasePart") and v.Name ~= 'HumanoidRootPart' then v.Transparency = 0 end end end) tool.Activated:connect(function() for i, v in pairs(model:GetChildren()) do if v.Name == "Part" then v.Transparency = 0.5 v.CanCollide = false handle.BrickColor = BrickColor.new("White") handle.Material = "Neon" tool.Deactivated:connect(function() for i, v in pairs(model:GetChildren()) do if v.Name == "Part" then handle.Material = "Plastic" v.Transparency = 0 v.CanCollide = true end end end) end end end)

This script only works inside studio but not the actual game.

0
Did you use a local script or a script? Xtmate_Roblox -5 — 5y
0
Yes Thepoint13 99 — 5y
0
"yes" does not answer that question... RubenKan 3615 — 5y
0
Is Filtering Enabled True? Sergiomontani10 236 — 5y
0
Sorry, my english is not perfect. It is a local script and Filtering Enabled is off. Thepoint13 99 — 5y

Answer this question