Hey! So i'm trying to use a very short and simple talky script for a spell system i'm working on, and i'm trying to move and old system over to a module. Now My problem right now is that for some reason it wont call the script. its just not working i dunno why! I keep getting this error
false Trying to call method on object of type: Script
with incorrect arguments.
Can anyone help!
local wand = script.Parent print("Found Wand") local Mag = require(game.SeverScriptService.MagicModule) print("Found Magic") game.Players.PlayerAdded:connect(function(player) if player.Name == wand.Parent.Name then player.Chatted:connect(function(msg) if msg == "Orlora" --What thing we need to chat to run the script then print("Orlora") wand.CurrentSpell.Value = "Orlora" Mag.CastSpell() end end) end end)
Module
------------------------------Normal Spell Casting---------------------------------------------------------- function CastSpell() if Mode.Value == "Orlora" then wand.Activated:wait() script.Disabled = false local c = wand.Parent.Humanoid:LoadAnimation(Magic.Animations.SummonSmoke1) c:play() local r = ArchFolder.Architype:Clone() r.Parent = person.RightHand r.Enabled = true local L = ArchFolder.Architype:Clone() L.Parent = person.LeftHand L.Enabled = true local q = Instance.new("Sound") q.Name = "Sound" q.Pitch = 0.9 q.SoundId = "http://www.roblox.com/asset/?id=207370820" q.Volume = 0.3 q.Looped = false q.archivable = false q.Parent = person.UpperTorso q:play() local p = Instance.new("Part") p.formFactor = "Symmetric" p.Shape = "Ball" p.Size = Vector3.new(1,1,1) p.TopSurface = "Smooth" p.BottomSurface = "Smooth" p.Transparency = 1 p.CanCollide = true ArchFolder.Architype:Clone().Parent = p p.Architype.Enabled = true ArchFolder.Sparkles:Clone().Parent = p p.Sparkles.Enabled = true ArchFolder.SpellLight:Clone().Parent = p p.SpellLight.Enabled = true coroutine.resume(coroutine.create(function() wait(.3) r.Enabled = false L.Enabled = false script.Disabled = false wait(6) r:Remove() L:Remove() end)) wait(.3) local cf = CFrame.new(person.UpperTorso.Position, person.Humanoid.TargetPoint) local bv = Instance.new("BodyVelocity") p.Parent = workspace p.Name = "MagicSpell" p.CFrame = cf + cf.lookVector * 4 bv.Parent = p while wait() do print("Repeating") bv.velocity = ((person.Humanoid.TargetPoint - p.Position).unit) * 100 p.Touched:connect(function(part) local nm = p.Architype p.Architype.Enabled = false p.Architype.Parent = part local sm = p.Sparkles p.Sparkles.Enabled = false p.Sparkles.Parent = part local s = Instance.new("Sound") s.Name = "Sound" s.Pitch = 0.9 s.SoundId = "http://www.roblox.com/asset/?id=216866819" s.Volume = 0.3 s.Looped = false s.archivable = false s.Parent = part s:play() p:remove(part,p) Mode.Value(part,p) wait(10) nm:Destroy() sm:Destroy() s:Destroy() end) end end end