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

2 Of the same scripts in different items, one works, and one doesn't, Help?

Asked by 7 years ago
Edited 7 years ago

My issue here is I have the same LocalScript, which shouldn't cause any glitches, since they're in different tools. I'm trying to change the neon parts to the player's team color, It works in my "Double Sided Axe" perfectly fine with no bugs/glitches what-so-ever. This is where my issue occurs, I copy and paste the same LocalScript into my "War Hammer", since I want it to do the same exact thing as in "Double Sided Axe", changing the neon parts to team color. They both have their part names correct in the "Tool" itself. This has got me baffled. If someone could help that'd be awesome! The "War Hammer" also seems to work in Studio, but not the game itself.

"Double Sided Axe TeamColoring LocalScript"

local player = game:GetService("Players").LocalPlayer
local neon = script.Parent.Neon
local neonG = script.Parent.NeonGlass

            neon.BrickColor = player.TeamColor
            neonG.BrickColor = player.TeamColor


"War Hammer TeamColoring LocalScript"

local player = game:GetService("Players").LocalPlayer
local neon = script.Parent.Neon
local neonG = script.Parent.NeonGlass

            neon.BrickColor = player.TeamColor
            neonG.BrickColor = player.TeamColor


Thanks

-Species

0
Are you getting any errors? unmiss 337 — 7y

1 answer

Log in to vote
0
Answered by 6 years ago

To make the color to change what you needed to do is BrickColor.new()

local player = game:GetService("Players").LocalPlayer
local neon = script.Parent.Neon
local neonG = script.Parent.NeonGlass
neon.BrickColor = BrickColor.new(player.TeamColor)
neonG.BrickColor = BrickColor.new(player.TeamColor)


Hopefully this helped you :) Plus I recommend to do the other script the same(It might probably not work in the real game)

Ad

Answer this question