Answered by
6 years ago Edited 6 years ago
1 | local newseed = game.Lighting.CloneSeedFruit.Starling_Seed:Clone() |
Use ReplicatedStorage it is seen by both client and server
Make sure the script isn't a LocalScript since the tool will be in workspace(Character is in workspace) a script will allow everyone to see it when cloned.
So what I would do is you can make a localscript fired a RemoteEvent and that will just send the player
LocalScript:
1 | script.Parent.Deactivated:Connect( function () |
2 | script.Parent.RemoteEvent:FireServer() |
Script:
01 | local t = game:GetService( "TweenService" ) |
02 | script.Parent.RemoteEvent.OnServerEvent:Connect( function (plr) |
04 | local oldseed = script.Parent |
05 | local seed = script.Parent.Handle:Clone() |
06 | seed.Parent = game.Workspace |
07 | seed.CFrame = plr.Character.Starling_Seed.Handle.CFrame |
08 | seed.CanCollide = false |
16 | local boduy = Instance.new( "BodyPosition" , Mesh) |
17 | boduy.MaxForce = Vector 3. new( 5000 , 5000 , 5000 ) |
18 | boduy.Position = Vector 3. new(seed.CFrame.X, 100 ,seed.CFrame.Z) |
25 | goal.Size = Vector 3. new( 100.5 , 50.96 , 100.751 ) |
26 | goal.Orientation = Vector 3. new( 90 , plr.Character.HumanoidRootPart.CFrame.Y, 90 ) |
27 | goal.Color = Color 3. fromRGB( 255 , 0 , 0 ) |
28 | local g = t:Create(Mesh, TweenInfo.new( 50 ), goal) |
31 | local newseed = game.Lighting.CloneSeedFruit.Starling_Seed:Clone() |
32 | newseed.Handle.CFrame = Mesh.CFrame |
33 | newseed.Parent = game.Workspace |
Just adjust that to fit your tool
So you will have LocalScript Script RemoteEvent