Basically I'm working on making a magic attack, using FE. (I'm not experienced with FE so it is supposed to be super basic) The part that I am going to use for it isn't even spawning.
Local Script
local event = game.ReplicatedStorage.Pet local plr = game.Players.LocalPlayer local char = plr.Character or plr:WaitForChild("Character") local tool = script.Parent tool.Activated:Connect(function() event:FireServer(char.Torso.Position) end)
Server Script
local event = game.ReplicatedStorage.Pet local plr = game.Players.LocalPlayer local char = plr.Character or plr:WaitForChild("Character") event.OnServerEvent:Connect(function(plr,position) local gay = Instance.new("Part") gay.Shape = "Ball" gay.BrickColor = BrickColor.new("Red") gay.Position = position gay.Parent = workspace.Magic end)
Anyone know the problem?
You did not specify where you want the part to be placed in when created, it should be:
Instance.new("Part", workspace)
instead of just:
Instance.new("Part")
LocalScript
local ReplicatedStorage = game:GetService("ReplicatedStorage") local Magic = ReplicatedStorage:WaitForChild("Magic") local Player = game.Players.LocalPlayer script.Parent.Activated:Connect(function() Magic:FireServer(Player) end)
Script
local ReplicatedStorage = game:GetService("ReplicatedStorage") local Magic = ReplicatedStorage:WaitForChild("Magic") Magic.OnServerEvent:Connect(function(player,Player) local Character = Player.Character print(Character.Name) local HMRP = Character:WaitForChild("HumanoidRootPart") local Part = Instance.new("Part") Part.Parent = workspace Part.Shape = "Ball" Part.Size = Vector3.new(5,5,5) Part.CFrame = CFrame.new(HMRP.Position + Vector3.new(0,2,0)) end)
try this for now