There could be a couple of issues here. Either...
Either way, I'll solve those for you here. To accomplish this, you'll simply need to get the local script out of workspace and put it somewhere it can actually run, like StarterPlayerScripts.
local player = game:GetService("Players").LocalPlayer
local mouse = player:GetMouse()
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteEvent = ReplicatedStorage:WaitForChild("RemoteEvent")
local trigger = workspace.Part
local CanScale = false
trigger.Touched:Connect(function(part)
CanScale = true
end)
trigger.TouchEnded:Connect(function(part)
CanScale = false
end)
mouse.Button1Down:Connect(function()
if CanScale then
RemoteEvent:FireServer(trigger)
end
end)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteEvent = Instance.new("RemoteEvent")
RemoteEvent.Parent = ReplicatedStorage
RemoteEvent.OnServerEvent:Connect(function(plr,part)
part.Size = part.Size - Vector3.new(.01,.01,.01)
end)
##Resources:
Remote Events
##Accept and upvote if this helps!
2 comments
not bad
thank u brother incatrash