of     1   

Caedus01013
#138341216Friday, June 27, 2014 4:39 AM GMT

Greetings. I am trying to enchant a sword in such a way that when I say a spell the sword lights up on fire. I've tried to figure it out but I just can't,so I'll need help since i'm rather new to scripting. Here is an example of what I am trying to do: game.Players.PlayerAdded:connect(function(plr) plr.Chatted:connect(function(msg) if msg=="TheChattedSpell" then f=Instance.new("Fire",plr.LinkedSword) f.Fize=10 f.Color=BrickColor.new("Lime green").Color f.SecondaryColor=BrickColor.new("Lime green").Color end end) end) Any help would be very appreciated! Btw,could I somehow do this by putting a LocalScript in the sword?
Nagrath99
#138341294Friday, June 27, 2014 4:40 AM GMT

Yes you could do this by putting a LocalScript in the sword, which is a lot better to do.
Caedus01013
#138341731Friday, June 27, 2014 4:45 AM GMT

Does the PlayerAdded and Chatted event work with a LocalScript? I assume I would use LocalPlayer,but I don't know how to get to the sword through .LocalPlayer .(Sorry if i'm acting clueless)
Caedus01013
#138341872Friday, June 27, 2014 4:46 AM GMT

Bump
DigitalVeer
#138342150Friday, June 27, 2014 4:49 AM GMT

With your script, it'll make a fire for everyones sword xD If you just want it for the local player, in the sword, put a localscript; local plr = game.Players.LocalPlayer plr.Chatted:connect(function(steve) if steve:lower() == "thechattedspell" then f = Instance.new("Fire",script.Parent) f.Size = 10 f.Color = BrickColor.new("Lime green").Color f.SecondaryColor = BrickColor.new("Lime green").Color end end)
Caedus01013
#138342563Friday, June 27, 2014 4:54 AM GMT

I had a feeling using a LocalScript would be the better way to go. This completely answers my question. Thanks so much for the help!
Caedus01013
#138342778Friday, June 27, 2014 4:56 AM GMT

So very simple. I need to start thinking outside the box more.

    of     1