#dragging help

1 messages · Page 1 of 1 (latest)

full fox
#

so basically i have this script which like if i hold a fruit the proximity promt is gonna be visible then when you click e it changes your view and spawns the fruit you were holding beside it and i cant drag the fruit even tho the mouse changes and i did like a print and saw it prints dragging start and dragging end IT DOSENT MOVE```local rs = game:GetService("ReplicatedStorage")
local players = game:GetService("Players")
local tool
local fruitfolder = rs:WaitForChild("Fruits")
local container = script.Parent.Parent
local prompt = script.Parent
prompt.Enabled = false
local remev = rs:WaitForChild("yes")
remev.OnServerEvent:Connect(function(player,equiped,fruit)
if equiped then
prompt.Enabled = true
else
prompt.Enabled = false
end
tool = fruit

end)
local juicerremote = rs:WaitForChild("juicerremote")
local viewchanger = juicerremote:WaitForChild("veiwchanger")

prompt.Triggered:Connect(function(player)
viewchanger:FireClient(player,tool)

end)```
server script which makes the proximity prmt visible

#
local rs = game:GetService("ReplicatedStorage")
local juicerremote = rs:WaitForChild("juicerremote")
local viewchanger = juicerremote:WaitForChild("veiwchanger")
local players = game:GetService("Players")
local player = players.LocalPlayer
local character = player.Character or player:WaitForChild("Character")
local humanoid = character:WaitForChild("Humanoid")
local camera = workspace.CurrentCamera
local viewpart = workspace:WaitForChild("juicer"):WaitForChild("view")
local fruitsfol = rs:WaitForChild("Fruitdrag")
local bottom = workspace:WaitForChild("juicer"):WaitForChild("bottom")
viewchanger.OnClientEvent:Connect(function(fruit)
    camera.CameraType = Enum.CameraType.Scriptable
    camera.CFrame = viewpart.CFrame
    
for _ , original in ipairs(fruitsfol:GetChildren()) do
    if original.Name == fruit then
        local newfruit = original:Clone()
        newfruit.Parent = workspace
            newfruit.CFrame = bottom.CFrame * CFrame.new(-4, 0, 0) 
        newfruit.Anchored = false
        newfruit.CanTouch = true
        newfruit.Massless = true
            newfruit.CollisionGroup = "Default"
            
    end
    
end
task.wait(5)
camera.CameraType = Enum.CameraType.Custom
camera.CameraSubject = humanoid


end)``` local script to change view and spawn apple