i want the player to be able to make a cube follow the mouse pointer for a few sec… and then get destroyed!
i did it in a localscript and then realized others couldn’t see it…
so i made a RemoteEvent!
(actually 2 but ok…)
one for creating the part and one for moving it.
the creating RemoteEvent works fine but when it wants to move to the mouse
it says: “Unable To Cast CoordinateFrame To TweenInfo”
This is the code in the event script:
Move.OnServerEvent:Connect(function(plr,Object,Destination,Tweeninfo)
local Service = game:GetService("TweenService")
local tween = Service:Create(Object,Tweeninfo,{ CFrame = Destination})
tween:Play()
repeat wait() until tween.PlaybackState == Enum.PlaybackState.Completed
return true
end)
and this is the code in the local script:
--Code Above This Code --------
local State = Move:FireServer(Part,Tweeninfo,Mouse.Hit)
---Code Below This Code
for some reason it doesn’t accept my information from the client…
Thanks In Advance!
It Doesn’t Set The Attachment0.
Wanna Know why???
Because…
The annoying create function returns nil while also creating the part!!!
yes the create function returns the part it had created,
but the client Recieves NIL .
its still the same script from my first post so im not going to rewrite it here.
why?
Edit: Im dumb i didn’t post it there because i thought it was flawless so im just going to post it here
Create.OnServerEvent:Connect(function(plr,Size,Parent,Color,Position,Anchored,Name)
local Part = Instance.new("Part")
Part.Parent = Parent
Part.Color = Color
Part.Size = Size
Part.Position = Position
Part.Anchored = Anchored
Part.Name = Name
print(Part.Name)
return Part
end)